Skip to main content
Version: v0.2.0

Supported Languages

LicenseOps automatically detects the correct comment syntax based on file extension or filename.

Line Comment //

ExtensionLanguage
.goGo
.rsRust
.javaJava
.js, .jsxJavaScript
.ts, .tsxTypeScript
.c, .hC
.cpp, .hpp, .ccC++
.csC#
.swiftSwift
.kt, .ktsKotlin
.scalaScala
.dartDart
.protoProtocol Buffers
.groovyGroovy
.zigZig
.m, .mmObjective-C
.v, .svVerilog / SystemVerilog

Filenames: Jenkinsfile

Line Comment #

ExtensionLanguage
.py, .pyiPython
.rbRuby
.sh, .bash, .zsh, .fishShell
.pl, .pmPerl
.yaml, .ymlYAML
.tomlTOML
.dockerfileDockerfile
.mkMakefile
.tf, .hclTerraform / HCL
.r, .RR
.ex, .exsElixir
.nixNix
.confConfig files
.cmakeCMake
.ps1, .psm1PowerShell
.tclTcl

Filenames: Dockerfile, Makefile, Rakefile, Gemfile, Vagrantfile

Line Comment --

ExtensionLanguage
.hsHaskell
.luaLua
.sqlSQL
.adaAda
.elmElm

Block Comment /* */

ExtensionLanguage
.cssCSS
.scssSCSS
.lessLess

These languages have no line-comment syntax. Headers use multi-line block comments:

/*
Copyright 2026 Acme Corp
SPDX-License-Identifier: Apache-2.0
*/

For SPDX 1-line mode:

/* SPDX-License-Identifier: MIT */

Block Comment <!-- -->

ExtensionLanguage
.html, .htmHTML
.xmlXML
.svgSVG
.vueVue

Skipped by Default

These file types are always skipped — they either have no comment syntax or are binary. You cannot add license headers to these types:

CategoryExtensions
Data.json, .lock, .sum, .mod, .map
Images.png, .jpg, .jpeg, .gif, .ico, .bmp, .webp, .tiff
Fonts.woff, .woff2, .ttf, .otf, .eot
Binary.wasm, .pdf, .zip, .tar, .gz, .bz2, .xz, .zst, .bin, .exe, .dll, .so, .dylib
Object files.o, .a, .lib
Media.mp3, .mp4, .wav, .avi
Minified.min.js, .min.css
Generated.pb.go, .patch, .diff

Special File Handling

Shebang Lines (#!/...)

Files starting with a shebang are handled correctly — the header is inserted after the shebang:

#!/usr/bin/env python3

# Copyright 2026 Acme Corp
# SPDX-License-Identifier: Apache-2.0

def main():
pass

Python Encoding Declarations

Python files with encoding declarations (# -*- coding: utf-8 -*-) have the header inserted after both the shebang and encoding:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Copyright 2026 Acme Corp
# SPDX-License-Identifier: Apache-2.0

def main():
pass

Generated Files

Files containing Code generated ... DO NOT EDIT or @generated markers are automatically skipped when skip-generated: true (the default). This is checked in the first 30 lines of each file.

tip

Use -v (verbose) to see which files are skipped and why.

See Also

  • Header Formats — how headers adapt to line vs. block comment styles
  • Custom Templates — handling both line and block comment languages in templates
  • Use Cases — multi-language project example (use case #11)