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

FormatExtensionsDescription
actionscript.asAdobe ActionScript, scripting language for Flash and Flex applications.
ada.adaAda, strongly-typed language for systems and embedded programming.
antlr4.g4ANTLR v4 grammar definition files.
apex.cls, .trigger, .apexSalesforce Apex, strongly-typed OOP language for the Salesforce platform.
apl.aplAPL, array-oriented programming language.
aspnet.asp, .aspxASP.NET, Microsoft server-side web application files.
astro.astroAstro, modern static-site builder component format mixing HTML, JS, and CSS.
awk.awkAWK, text-processing scripting language.
bash.sh, .ksh, .bashBash and POSIX shell scripts. Also detected via shebang for extensionless scripts.
basic.basBASIC, beginner-oriented general-purpose programming language.
bicep.bicepAzure Bicep, infrastructure-as-code DSL for Microsoft Azure.
brainfuck.b, .bfBrainfuck, minimalist esoteric programming language.
c.c, .z80C, general-purpose low-level programming language.
c-header.hC header files. Inherits c grammar.
cfml.cfmColdFusion Markup Language, server-side HTML template files. Inherits markup grammar.
cfscript.cfcColdFusion components written in CFScript.
clojure.cljs, .clj, .cljc, .cljx, .ednClojure, functional Lisp dialect for the JVM.
cmake.cmakeCMake build system scripts.
coffeescript.coffeeCoffeeScript, transpiled language that compiles to JavaScript.
cpp.cpp, .c++, .cc, .cxxC++, systems programming language extending C with OOP.
cpp-header.hpp, .h++, .hh, .hxxC++ header files. Inherits cpp grammar.
crystal.crCrystal, statically-typed language with Ruby-like syntax.
csharp.csC#, Microsoft's OOP language for .NET.
css.css, .gssCSS, Cascading Style Sheets for web styling.
csv.csvCSV, comma-separated values data files.
d.dD, systems language combining C speed with modern safety features.
dart.dartDart, Google's client-optimized language used in Flutter.
diff.diff, .patchUnified diff and patch files.
dot.dot, .gvGraphviz DOT language for graph and network diagrams.
eiffel.eEiffel, OOP language with design-by-contract methodology.
elm.elmElm, functional language for front-end web development.
erlang.erl, .erlangErlang, concurrent functional language for distributed systems.
excel-formula.xlsx, .xlsMicrosoft Excel spreadsheet files.
fortran.f, .for, .f77, .f90Fortran, scientific and numerical computing language.
fsharp.fsF#, functional-first language for .NET.
gdscript.gdGDScript, scripting language for the Godot game engine.
gettext.poGNU gettext PO translation and localisation files.
gherkin.featureGherkin, BDD scenario language used in Cucumber and Behave.
go.goGo, statically-typed compiled language from Google.
graphql.graphqlGraphQL, query language for APIs.
groovy.groovy, .gradleGroovy, dynamic JVM language; also covers Gradle build files.
haml.hamlHaml, HTML abstraction markup language.
handlebars.hb, .hbs, .handlebarsHandlebars, logicless HTML templating language.
haskell.hs, .lhsHaskell, purely functional programming language.
haxe.hx, .hxmlHaxe, cross-platform programming language and toolkit.
hcl.tf, .hclHashiCorp Configuration Language, used in Terraform and Vault.
idris.idrIdris, dependently-typed functional programming language.
ignore.gitignoreGit and tool ignore-pattern files.
ini.iniINI, simple key-value configuration file format.
java.javaJava, OOP language for the JVM.
javascript.js, .es, .es6, .mjs, .cjsJavaScript, scripting language for the web and Node.js.
json.json, .map, .jsonldJSON, JavaScript Object Notation data interchange format.
json5.json5JSON5, relaxed JSON with comments and trailing commas.
jsx.jsxJSX, JavaScript with embedded XML syntax for React.
julia.jlJulia, high-performance language for scientific computing.
kotlin.kt, .ktsKotlin, modern JVM language fully interoperable with Java.
latex.texLaTeX, document preparation and typesetting system.
less.lessLess, CSS preprocessor with variables, mixins, and nesting.
lilypond.lyLilyPond, text-based music notation language.
linker-script.ldGNU linker scripts for memory layout control.
lisp.cl, .lisp, .elCommon Lisp and Emacs Lisp source files.
livescript.lsLiveScript, functional language that compiles to JavaScript.
llvm.llLLVM IR, LLVM Intermediate Representation text format.
log.logLog files, structured or unstructured application output.
lua.luaLua, lightweight embeddable scripting language.
markdown.md, .markdown, .mkdMarkdown, lightweight markup language. Fenced code blocks are tokenized independently by language.
markup.html, .htm, .xml, .xsl, .xslt, .svg, .ejs, .jspHTML, XML, SVG, and similar markup languages.
nsis.nsh, .nsiNSIS, Nullsoft Scriptable Install System scripts.
objectivec.m, .mmObjective-C, C-based OOP language for Apple platforms.
ocaml.ocaml, .ml, .mli, .mll, .mlyOCaml, functional language with strong type inference.
openqasm.qasmOpenQASM, open quantum assembly language.
oz.ozOz, multi-paradigm language for the Mozart Programming System.
pascal.pas, .pPascal, structured imperative programming language.
perl.pl, .pmPerl, text-processing scripting language.
php.php, .phtmlPHP, server-side web scripting language.
plant-uml.puml, .plantumlPlantUML, text-based UML diagram definition language.
plsql.plsqlPL/SQL, Oracle's procedural extension to SQL.
powerquery.pqPower Query M, data transformation language for Microsoft tools.
powershell.ps1, .psd1, .psm1PowerShell, task automation and configuration management shell.
prolog.proProlog, logic programming language.
properties.propertiesJava .properties configuration files.
protobuf.protoProtocol Buffers, Google's binary serialization schema language.
pug.pug, .jadePug (formerly Jade), high-performance HTML template engine.
puppet.pp, .puppetPuppet, infrastructure-as-code configuration DSL.
purescript.pursPureScript, strongly-typed functional language compiling to JavaScript.
python.py, .pyx, .pxd, .pxiPython, high-level general-purpose programming language.
q.qQ/kdb+, vector programming language for time-series databases.
qsharp.qsQ#, Microsoft's quantum programming language.
r.r, .RR, statistical computing and data visualisation language.
racket.rktRacket, Lisp-family language for language-oriented programming.
razor.cshtml, .razorRazor, HTML with inlined C# code.
rescript.resReScript, fast typed language compiling to JavaScript.
robotframework.robotRobot Framework, acceptance testing and RPA framework DSL.
ruby.rbRuby, dynamic expressive OOP scripting language.
rust.rsRust, systems language focused on memory safety and performance.
sas.sasSAS, statistical analysis software language.
sass.sassSass, CSS extension language (indented syntax).
scala.scalaScala, OOP and functional language for the JVM.
scheme.scm, .ssScheme, minimalist Lisp dialect.
scss.scssSCSS, Sass CSS extension with C-style bracket syntax.
smalltalk.stSmalltalk, pioneering OOP language and live environment.
smarty.smarty, .tplSmarty, PHP template engine.
solidity.solSolidity, smart contract language for Ethereum and EVM chains.
soy.soyGoogle Closure Templates (Soy), type-safe HTML templating.
sparql.rqSPARQL, RDF graph query language.
sql.sql, .cqlSQL, Structured Query Language for relational databases.
stylus.styl, .stylusStylus, expressive dynamic CSS preprocessor.
svelte.svelteSvelte, reactive component framework with compiled templates.
swift.swiftSwift, Apple's modern language for iOS and macOS development.
tap.tapTAP, Test Anything Protocol output format.
tcl.tclTcl, embeddable tool command language.
textile.textileTextile, lightweight markup language for web content.
toml.tomlTOML, Tom's Obvious Minimal Language configuration format.
tsx.tsxTSX, TypeScript with embedded JSX syntax for React.
tt2.tt2Template Toolkit 2, Perl-based templating language.
turtle.ttlTurtle, Terse RDF Triple Language for semantic web data.
twig.twigTwig, flexible fast PHP templating engine.
txt.txtPlain text files.
typescript.ts, .mts, .ctsTypeScript, statically typed superset of JavaScript.
unrealscript.ucUnrealScript, scripting language for Unreal Engine 3.
vbnet.vbVisual Basic .NET, Microsoft's OOP language for .NET.
velocity.vtlApache Velocity, Java-based template engine.
verilog.vVerilog, hardware description language for digital circuits.
vhdl.vhd, .vhdlVHDL, VHSIC Hardware Description Language.
vue.vueVue Single-File Component, combining template, script, and style blocks.
wgsl.wgslWGSL, WebGPU Shading Language.
wolfram.wl, .nbWolfram Language, symbolic language used in Mathematica.
xquery.xy, .xqueryXQuery, query and transformation language for XML databases.
yaml.yaml, .ymlYAML, human-readable data serialisation format.
zig.zigZig, 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>]".

FormatDescription
abapSAP ABAP, Advanced Business Application Programming language for SAP systems.
abnfAugmented Backus-Naur Form grammar notation.
agdaAgda, dependently-typed functional programming language.
apacheconfApache HTTP Server configuration files.
applescriptAppleScript, macOS automation scripting language.
aqlAQL, ArangoDB query language.
arduinoArduino, C++ dialect for microcontroller sketches.
arffARFF, Weka attribute-relation file format for machine learning datasets.
armasmARM assembly language.
asciidocAsciiDoc, text document format for technical writing.
asm6502MOS 6502 assembly language.
autohotkeyAutoHotkey, Windows automation and hotkey scripting language.
autoitAutoIt, Windows GUI automation scripting language.
batchWindows batch and cmd scripts.
bisonGNU Bison parser generator grammar files.
bnfBNF, Backus-Naur Form grammar notation.
broBro/Zeek, network traffic analysis scripting language.
clike
cobolCOBOL, common business-oriented language.
comments
cspContent Security Policy header files.
css-extrasExtended CSS at-rules and selector patterns.
cypherCypher, graph query language for Neo4j.
dhallDhall, programmable total configuration language.
djangoDjango/Jinja2, Python web framework HTML template language.
dns-zone-fileDNS zone file format.
dockerDockerfile, Docker container image build instructions.
ebnfEBNF, Extended Backus-Naur Form grammar notation.
editorconfig.editorconfig, per-directory editor configuration format.
elixirElixir, functional language built on Erlang/BEAM.
erbERB, Embedded Ruby HTML templating.
factorFactor, concatenative stack-based programming language.
flowFlow, Facebook's static type checker annotations for JavaScript.
ftlFreeMarker Template Language, Java-based template engine.
gcodeG-code, CNC machine tool programming language.
gedcomGEDCOM, genealogical data interchange format.
gitGit configuration and commit message files.
glslGLSL, OpenGL Shading Language.
gmlGML, GameMaker Language for game logic and events.
go-moduleGo module files (go.mod and go.sum).
hlslHLSL, High-Level Shading Language for DirectX.
hpkp
hsts
httpHTTP request and response message format.
ichigojamIchigoJam BASIC, beginner BASIC for the IchigoJam microcomputer.
iconIcon, high-level general-purpose programming language.
inform7Inform 7, natural language interactive fiction authoring system.
ioIo, prototype-based OOP language with concurrency primitives.
jJ, high-performance array programming language (successor to APL).
jolieJolie, service-oriented programming language for microservices.
jqjq, JSON query and transformation language.
keymap
kustoKQL/Kusto, Azure Data Explorer and Log Analytics query language.
liquidLiquid, Shopify's safe customer-facing templating language.
lolcodeLOLCODE, humorous esoteric programming language.
makefileGNU Make build scripts.
matlabMATLAB, matrix-oriented numerical computing language.
melMEL, Maya Embedded Language for Autodesk Maya automation.
mermaidMermaid, diagram-as-code definition language.
mizarMizar, formal mathematics and proof assistant language.
mongodbMongoDB shell and aggregation pipeline query language.
monkeyMonkey, cross-platform game development language.
n1qlN1QL, Couchbase's SQL-like query language for JSON documents.
n4jsN4JS, typed JavaScript superset by NumberFour.
nasmNASM, Netwide Assembler x86 assembly syntax.
nginxNginx web server configuration files.
nimNim, statically-typed compiled systems language.
nixNix, purely functional package manager configuration language.
odinOdin, data-oriented systems programming language.
openclOpenCL, open standard for parallel programming across CPUs and GPUs.
parigpPARI/GP, computer algebra system scripting language.
processingProcessing, visual arts and creative coding language.
promqlPromQL, Prometheus time-series query language.
purePure, functional language based on term rewriting.
qoreQore, high-level multi-threaded programming language.
reasonReasonML, OCaml-based language with JavaScript-friendly syntax.
regexRegular expression patterns.
regoRego, Open Policy Agent (OPA) policy language.
renpyRen'Py, visual novel scripting language.
restreStructuredText, documentation markup language used in Sphinx.
ripRip, object-oriented scripting language.
roboconfRoboconf, graph-based distributed application deployment language.
shell-sessionShell session transcripts with prompt markers.
smaliSmali, Android Dalvik bytecode assembly language.
stataStata, statistical analysis and data management language.
typoscriptTypoScript, TYPO3 CMS configuration and templating language.
uri
valaVala, OOP language that compiles to C for GNOME applications.
vimVimScript, Vim editor scripting and configuration language.
visual-basic
wasmWebAssembly text format (WAT).
wikiMediaWiki markup language.
xeoraXeora, ASP.NET-style web framework template language.
xojoXojo, cross-platform RAD development language.

Format name aliases

--format also accepts these aliases:

AliasFormat
golanggo
nodejavascript
shellbash
zshbash

Shebang detection

Files without an extension are classified by the interpreter named on their first #! line:

InterpreterDetected as
python3, pythonpython
node, nodejsjavascript
rubyruby
bash, /shbash
perlperl
phpphp