Reference
Supported formats
The 224 formats jscpd 5.4.0 tokenizes, with the extensions and shebangs that select them, generated from the FORMATS.md of the release.
jscpd picks a format for each file from its extension, its file name or its shebang line, and tokenizes the file with that format's comment and string rules. jscpd --list prints the names. A format with no extension of its own is still available: map it to an extension with --formats-exts or to a file name with --formats-names, as the examples in the tables show.
Terminal
jscpd --list # the 224 format names
jscpd --formats-exts "javascript:es,es6" . # treat .es and .es6 as JavaScript
jscpd --formats-names "docker:Dockerfile" . # pick a format by file name
jscpd --format javascript,typescript . # scan only these formats
Auto-detected formats
| Format | Extensions | Description |
|---|---|---|
actionscript | .as | Adobe ActionScript, scripting language for Flash and Flex applications. |
ada | .ada | Ada, strongly-typed language for systems and embedded programming. |
antlr4 | .g4 | ANTLR v4 grammar definition files. |
apex | .cls, .trigger, .apex | Salesforce Apex, strongly-typed OOP language for the Salesforce platform. |
apl | .apl | APL, array-oriented programming language. |
aspnet | .asp, .aspx | ASP.NET, Microsoft server-side web application files. |
astro | .astro | Astro, modern static-site builder component format mixing HTML, JS, and CSS. |
awk | .awk | AWK, text-processing scripting language. |
bash | .sh, .ksh, .bash | Bash and POSIX shell scripts. Also detected via shebang for extensionless scripts. |
basic | .bas | BASIC, beginner-oriented general-purpose programming language. |
bicep | .bicep | Azure Bicep, infrastructure-as-code DSL for Microsoft Azure. |
brainfuck | .b, .bf | Brainfuck, minimalist esoteric programming language. |
c | .c, .z80 | C, general-purpose low-level programming language. |
c-header | .h | C header files. Inherits c grammar. |
cfml | .cfm | ColdFusion Markup Language, server-side HTML template files. Inherits markup grammar. |
cfscript | .cfc | ColdFusion components written in CFScript. |
clojure | .cljs, .clj, .cljc, .cljx, .edn | Clojure, functional Lisp dialect for the JVM. |
cmake | .cmake | CMake build system scripts. |
coffeescript | .coffee | CoffeeScript, transpiled language that compiles to JavaScript. |
cpp | .cpp, .c++, .cc, .cxx | C++, systems programming language extending C with OOP. |
cpp-header | .hpp, .h++, .hh, .hxx | C++ header files. Inherits cpp grammar. |
crystal | .cr | Crystal, statically-typed language with Ruby-like syntax. |
csharp | .cs | C#, Microsoft's OOP language for .NET. |
css | .css, .gss | CSS, Cascading Style Sheets for web styling. |
csv | .csv | CSV, comma-separated values data files. |
d | .d | D, systems language combining C speed with modern safety features. |
dart | .dart | Dart, Google's client-optimized language used in Flutter. |
diff | .diff, .patch | Unified diff and patch files. |
dot | .dot, .gv | Graphviz DOT language for graph and network diagrams. |
eiffel | .e | Eiffel, OOP language with design-by-contract methodology. |
elm | .elm | Elm, functional language for front-end web development. |
erlang | .erl, .erlang | Erlang, concurrent functional language for distributed systems. |
excel-formula | .xlsx, .xls | Microsoft Excel spreadsheet files. |
fortran | .f, .for, .f77, .f90 | Fortran, scientific and numerical computing language. |
fsharp | .fs | F#, functional-first language for .NET. |
gdscript | .gd | GDScript, scripting language for the Godot game engine. |
gettext | .po | GNU gettext PO translation and localisation files. |
gherkin | .feature | Gherkin, BDD scenario language used in Cucumber and Behave. |
go | .go | Go, statically-typed compiled language from Google. |
graphql | .graphql | GraphQL, query language for APIs. |
groovy | .groovy, .gradle | Groovy, dynamic JVM language; also covers Gradle build files. |
haml | .haml | Haml, HTML abstraction markup language. |
handlebars | .hb, .hbs, .handlebars | Handlebars, logicless HTML templating language. |
haskell | .hs, .lhs | Haskell, purely functional programming language. |
haxe | .hx, .hxml | Haxe, cross-platform programming language and toolkit. |
hcl | .tf, .hcl | HashiCorp Configuration Language, used in Terraform and Vault. |
idris | .idr | Idris, dependently-typed functional programming language. |
ignore | .gitignore | Git and tool ignore-pattern files. |
ini | .ini | INI, simple key-value configuration file format. |
java | .java | Java, OOP language for the JVM. |
javascript | .js, .es, .es6, .mjs, .cjs | JavaScript, scripting language for the web and Node.js. |
json | .json, .map, .jsonld | JSON, JavaScript Object Notation data interchange format. |
json5 | .json5 | JSON5, relaxed JSON with comments and trailing commas. |
jsx | .jsx | JSX, JavaScript with embedded XML syntax for React. |
julia | .jl | Julia, high-performance language for scientific computing. |
kotlin | .kt, .kts | Kotlin, modern JVM language fully interoperable with Java. |
latex | .tex | LaTeX, document preparation and typesetting system. |
less | .less | Less, CSS preprocessor with variables, mixins, and nesting. |
lilypond | .ly | LilyPond, text-based music notation language. |
linker-script | .ld | GNU linker scripts for memory layout control. |
lisp | .cl, .lisp, .el | Common Lisp and Emacs Lisp source files. |
livescript | .ls | LiveScript, functional language that compiles to JavaScript. |
llvm | .ll | LLVM IR, LLVM Intermediate Representation text format. |
log | .log | Log files, structured or unstructured application output. |
lua | .lua | Lua, lightweight embeddable scripting language. |
markdown | .md, .markdown, .mkd | Markdown, lightweight markup language. Fenced code blocks are tokenized independently by language. |
markup | .html, .htm, .xml, .xsl, .xslt, .svg, .ejs, .jsp | HTML, XML, SVG, and similar markup languages. |
nsis | .nsh, .nsi | NSIS, Nullsoft Scriptable Install System scripts. |
objectivec | .m, .mm | Objective-C, C-based OOP language for Apple platforms. |
ocaml | .ocaml, .ml, .mli, .mll, .mly | OCaml, functional language with strong type inference. |
openqasm | .qasm | OpenQASM, open quantum assembly language. |
oz | .oz | Oz, multi-paradigm language for the Mozart Programming System. |
pascal | .pas, .p | Pascal, structured imperative programming language. |
perl | .pl, .pm | Perl, text-processing scripting language. |
php | .php, .phtml | PHP, server-side web scripting language. |
plant-uml | .puml, .plantuml | PlantUML, text-based UML diagram definition language. |
plsql | .plsql | PL/SQL, Oracle's procedural extension to SQL. |
powerquery | .pq | Power Query M, data transformation language for Microsoft tools. |
powershell | .ps1, .psd1, .psm1 | PowerShell, task automation and configuration management shell. |
prolog | .pro | Prolog, logic programming language. |
properties | .properties | Java .properties configuration files. |
protobuf | .proto | Protocol Buffers, Google's binary serialization schema language. |
pug | .pug, .jade | Pug (formerly Jade), high-performance HTML template engine. |
puppet | .pp, .puppet | Puppet, infrastructure-as-code configuration DSL. |
purescript | .purs | PureScript, strongly-typed functional language compiling to JavaScript. |
python | .py, .pyx, .pxd, .pxi | Python, high-level general-purpose programming language. |
q | .q | Q/kdb+, vector programming language for time-series databases. |
qsharp | .qs | Q#, Microsoft's quantum programming language. |
r | .r, .R | R, statistical computing and data visualisation language. |
racket | .rkt | Racket, Lisp-family language for language-oriented programming. |
razor | .cshtml, .razor | Razor, HTML with inlined C# code. |
rescript | .res | ReScript, fast typed language compiling to JavaScript. |
robotframework | .robot | Robot Framework, acceptance testing and RPA framework DSL. |
ruby | .rb | Ruby, dynamic expressive OOP scripting language. |
rust | .rs | Rust, systems language focused on memory safety and performance. |
sas | .sas | SAS, statistical analysis software language. |
sass | .sass | Sass, CSS extension language (indented syntax). |
scala | .scala | Scala, OOP and functional language for the JVM. |
scheme | .scm, .ss | Scheme, minimalist Lisp dialect. |
scss | .scss | SCSS, Sass CSS extension with C-style bracket syntax. |
smalltalk | .st | Smalltalk, pioneering OOP language and live environment. |
smarty | .smarty, .tpl | Smarty, PHP template engine. |
solidity | .sol | Solidity, smart contract language for Ethereum and EVM chains. |
soy | .soy | Google Closure Templates (Soy), type-safe HTML templating. |
sparql | .rq | SPARQL, RDF graph query language. |
sql | .sql, .cql | SQL, Structured Query Language for relational databases. |
stylus | .styl, .stylus | Stylus, expressive dynamic CSS preprocessor. |
svelte | .svelte | Svelte, reactive component framework with compiled templates. |
swift | .swift | Swift, Apple's modern language for iOS and macOS development. |
tap | .tap | TAP, Test Anything Protocol output format. |
tcl | .tcl | Tcl, embeddable tool command language. |
textile | .textile | Textile, lightweight markup language for web content. |
toml | .toml | TOML, Tom's Obvious Minimal Language configuration format. |
tsx | .tsx | TSX, TypeScript with embedded JSX syntax for React. |
tt2 | .tt2 | Template Toolkit 2, Perl-based templating language. |
turtle | .ttl | Turtle, Terse RDF Triple Language for semantic web data. |
twig | .twig | Twig, flexible fast PHP templating engine. |
txt | .txt | Plain text files. |
typescript | .ts, .mts, .cts | TypeScript, statically typed superset of JavaScript. |
unrealscript | .uc | UnrealScript, scripting language for Unreal Engine 3. |
vbnet | .vb | Visual Basic .NET, Microsoft's OOP language for .NET. |
velocity | .vtl | Apache Velocity, Java-based template engine. |
verilog | .v | Verilog, hardware description language for digital circuits. |
vhdl | .vhd, .vhdl | VHDL, VHSIC Hardware Description Language. |
vue | .vue | Vue Single-File Component, combining template, script, and style blocks. |
wgsl | .wgsl | WGSL, WebGPU Shading Language. |
wolfram | .wl, .nb | Wolfram Language, symbolic language used in Mathematica. |
xquery | .xy, .xquery | XQuery, query and transformation language for XML databases. |
yaml | .yaml, .yml | YAML, human-readable data serialisation format. |
zig | .zig | Zig, low-level systems programming language with no hidden control flow. |
Registered formats without an extension mapping
Activate one of these with --formats-exts "<format>:<ext>[,<ext>]".
| Format | Description |
|---|---|
abap | SAP ABAP, Advanced Business Application Programming language for SAP systems. |
abnf | Augmented Backus-Naur Form grammar notation. |
agda | Agda, dependently-typed functional programming language. |
apacheconf | Apache HTTP Server configuration files. |
applescript | AppleScript, macOS automation scripting language. |
aql | AQL, ArangoDB query language. |
arduino | Arduino, C++ dialect for microcontroller sketches. |
arff | ARFF, Weka attribute-relation file format for machine learning datasets. |
armasm | ARM assembly language. |
asciidoc | AsciiDoc, text document format for technical writing. |
asm6502 | MOS 6502 assembly language. |
autohotkey | AutoHotkey, Windows automation and hotkey scripting language. |
autoit | AutoIt, Windows GUI automation scripting language. |
batch | Windows batch and cmd scripts. |
bison | GNU Bison parser generator grammar files. |
bnf | BNF, Backus-Naur Form grammar notation. |
bro | Bro/Zeek, network traffic analysis scripting language. |
clike | |
cobol | COBOL, common business-oriented language. |
comments | |
csp | Content Security Policy header files. |
css-extras | Extended CSS at-rules and selector patterns. |
cypher | Cypher, graph query language for Neo4j. |
dhall | Dhall, programmable total configuration language. |
django | Django/Jinja2, Python web framework HTML template language. |
dns-zone-file | DNS zone file format. |
docker | Dockerfile, Docker container image build instructions. |
ebnf | EBNF, Extended Backus-Naur Form grammar notation. |
editorconfig | .editorconfig, per-directory editor configuration format. |
elixir | Elixir, functional language built on Erlang/BEAM. |
erb | ERB, Embedded Ruby HTML templating. |
factor | Factor, concatenative stack-based programming language. |
flow | Flow, Facebook's static type checker annotations for JavaScript. |
ftl | FreeMarker Template Language, Java-based template engine. |
gcode | G-code, CNC machine tool programming language. |
gedcom | GEDCOM, genealogical data interchange format. |
git | Git configuration and commit message files. |
glsl | GLSL, OpenGL Shading Language. |
gml | GML, GameMaker Language for game logic and events. |
go-module | Go module files (go.mod and go.sum). |
hlsl | HLSL, High-Level Shading Language for DirectX. |
hpkp | |
hsts | |
http | HTTP request and response message format. |
ichigojam | IchigoJam BASIC, beginner BASIC for the IchigoJam microcomputer. |
icon | Icon, high-level general-purpose programming language. |
inform7 | Inform 7, natural language interactive fiction authoring system. |
io | Io, prototype-based OOP language with concurrency primitives. |
j | J, high-performance array programming language (successor to APL). |
jolie | Jolie, service-oriented programming language for microservices. |
jq | jq, JSON query and transformation language. |
keymap | |
kusto | KQL/Kusto, Azure Data Explorer and Log Analytics query language. |
liquid | Liquid, Shopify's safe customer-facing templating language. |
lolcode | LOLCODE, humorous esoteric programming language. |
makefile | GNU Make build scripts. |
matlab | MATLAB, matrix-oriented numerical computing language. |
mel | MEL, Maya Embedded Language for Autodesk Maya automation. |
mermaid | Mermaid, diagram-as-code definition language. |
mizar | Mizar, formal mathematics and proof assistant language. |
mongodb | MongoDB shell and aggregation pipeline query language. |
monkey | Monkey, cross-platform game development language. |
n1ql | N1QL, Couchbase's SQL-like query language for JSON documents. |
n4js | N4JS, typed JavaScript superset by NumberFour. |
nasm | NASM, Netwide Assembler x86 assembly syntax. |
nginx | Nginx web server configuration files. |
nim | Nim, statically-typed compiled systems language. |
nix | Nix, purely functional package manager configuration language. |
odin | Odin, data-oriented systems programming language. |
opencl | OpenCL, open standard for parallel programming across CPUs and GPUs. |
parigp | PARI/GP, computer algebra system scripting language. |
processing | Processing, visual arts and creative coding language. |
promql | PromQL, Prometheus time-series query language. |
pure | Pure, functional language based on term rewriting. |
qore | Qore, high-level multi-threaded programming language. |
reason | ReasonML, OCaml-based language with JavaScript-friendly syntax. |
regex | Regular expression patterns. |
rego | Rego, Open Policy Agent (OPA) policy language. |
renpy | Ren'Py, visual novel scripting language. |
rest | reStructuredText, documentation markup language used in Sphinx. |
rip | Rip, object-oriented scripting language. |
roboconf | Roboconf, graph-based distributed application deployment language. |
shell-session | Shell session transcripts with prompt markers. |
smali | Smali, Android Dalvik bytecode assembly language. |
stata | Stata, statistical analysis and data management language. |
typoscript | TypoScript, TYPO3 CMS configuration and templating language. |
uri | |
vala | Vala, OOP language that compiles to C for GNOME applications. |
vim | VimScript, Vim editor scripting and configuration language. |
visual-basic | |
wasm | WebAssembly text format (WAT). |
wiki | MediaWiki markup language. |
xeora | Xeora, ASP.NET-style web framework template language. |
xojo | Xojo, cross-platform RAD development language. |
Format name aliases
--format also accepts these aliases:
| Alias | Format |
|---|---|
golang | go |
node | javascript |
shell | bash |
zsh | bash |
Shebang detection
Files without an extension are classified by the interpreter named on their first #! line:
| Interpreter | Detected as |
|---|---|
python3, python | python |
node, nodejs | javascript |
ruby | ruby |
bash, /sh | bash |
perl | perl |
php | php |