Reference

Supported formats

86 views
The 224 formats jscpd 5.4.3 tokenizes, with the extensions, file names 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 "python:Tiltfile" .    # pick a format by file name
jscpd --format javascript,typescript .       # scan only these formats

Auto-detected formats

FormatExtensions and file namesDescription
abap.abapSAP ABAP, Advanced Business Application Programming language for SAP systems.
abnf.abnfAugmented Backus-Naur Form grammar notation.
actionscript.asAdobe ActionScript, scripting language for Flash and Flex applications.
ada.adaAda, strongly-typed language for systems and embedded programming.
agda.agdaAgda, dependently-typed functional programming language.
antlr4.g4ANTLR v4 grammar definition files.
apacheconf.apacheconf; files .htaccess, apache2.conf, httpd.confApache HTTP Server configuration files.
apex.cls, .trigger, .apexSalesforce Apex, strongly-typed OOP language for the Salesforce platform.
apl.aplAPL, array-oriented programming language.
applescript.applescriptAppleScript, macOS automation scripting language.
aql.aqlAQL, ArangoDB query language.
arduino.inoArduino, C++ dialect for microcontroller sketches.
asciidoc.adoc, .asciidocAsciiDoc, text document format for technical writing.
aspnet.asp, .aspxASP.NET, Microsoft server-side web application files.
astro.astroAstro, modern static-site builder component format mixing HTML, JS, and CSS.
autohotkey.ahk, .ah2AutoHotkey, Windows automation and hotkey scripting language.
autoit.au3AutoIt, Windows GUI automation scripting language.
awk.awkAWK, text-processing scripting language.
bash.sh, .ksh, .bash, .zsh, .bats; files .bash_aliases, .bash_logout, .bash_profile, .bashrc, .profile, .zlogin, .zprofile, .zshenv, .zshrc, PKGBUILDBash and POSIX shell scripts. Also detected via shebang for extensionless scripts.
basic.basBASIC, beginner-oriented general-purpose programming language.
batch.bat, .cmdWindows batch and cmd scripts.
bicep.bicepAzure Bicep, infrastructure-as-code DSL for Microsoft Azure.
bison.y, .yacc, .bisonGNU Bison parser generator grammar files.
bnf.bnfBNF, Backus-Naur Form grammar notation.
brainfuck.b, .bfBrainfuck, minimalist esoteric programming language.
bro.zeek, .broBro/Zeek, network traffic analysis scripting 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, .cljd, .cljx, .ednClojure, functional Lisp dialect for the JVM.
cmake.cmake; files CMakeLists.txtCMake build system scripts.
cobol.cob, .cbl, .cpy, .cobolCOBOL, common business-oriented language.
coffeescript.coffeeCoffeeScript, transpiled language that compiles to JavaScript.
cpp.cpp, .c++, .cc, .cxx, .cppm, .ixxC++, systems programming language extending C with OOP.
cpp-header.hpp, .h++, .hh, .hxx, .ipp, .tpp, .inlC++ header files. Inherits cpp grammar.
crystal.crCrystal, statically-typed language with Ruby-like syntax.
csharp.cs, .csxC#, Microsoft's OOP language for .NET.
css.css, .gssCSS, Cascading Style Sheets for web styling.
csv.csvCSV, comma-separated values data files.
cypher.cypher, .cypCypher, graph query language for Neo4j.
d.dD, systems language combining C speed with modern safety features.
dart.dartDart, Google's client-optimized language used in Flutter.
dhall.dhallDhall, programmable total configuration language.
diff.diff, .patchUnified diff and patch files.
django.jinja, .jinja2, .j2Django/Jinja2, Python web framework HTML template language.
dns-zone-file.zone, .arpaDNS zone file format.
docker.dockerfile, .Dockerfile, .containerfile; files Containerfile, DockerfileDockerfile, Docker container image build instructions.
dot.dot, .gvGraphviz DOT language for graph and network diagrams.
ebnf.ebnfEBNF, Extended Backus-Naur Form grammar notation.
editorconfig.editorconfig; files .editorconfig.editorconfig, per-directory editor configuration format.
eiffel.eEiffel, OOP language with design-by-contract methodology.
elixir.ex, .exsElixir, functional language built on Erlang/BEAM.
elm.elmElm, functional language for front-end web development.
erb.erb, .rhtmlERB, Embedded Ruby HTML templating.
erlang.erl, .erlang, .hrl; files Emakefile, rebar.configErlang, concurrent functional language for distributed systems.
excel-formula.xlsx, .xlsMicrosoft Excel spreadsheet files.
factor.factorFactor, concatenative stack-based programming language.
fortran.f, .for, .f77, .f90Fortran, scientific and numerical computing language.
fsharp.fs, .fsi, .fsxF#, functional-first language for .NET.
ftl.ftl, .ftlhFreeMarker Template Language, Java-based template engine.
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.
glsl.glsl, .vert, .frag, .geom, .tesc, .tese, .comp, .rgen, .rint, .rahit, .rchit, .rmiss, .rcallGLSL, OpenGL Shading Language.
go.goGo, statically-typed compiled language from Google.
go-modulefiles go.mod, go.workGo module and workspace files (go.mod, go.work).
graphql.graphqlGraphQL, query language for APIs.
groovy.groovy, .gradle, .gvy; files JenkinsfileGroovy, 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, .hcl, .tfvarsHashiCorp Configuration Language, used in Terraform and Vault.
hlsl.hlsl, .hlsli, .fx, .fxh, .cgincHLSL, High-Level Shading Language for DirectX.
http.httpHTTP request and response message format.
icon.icnIcon, high-level general-purpose programming language.
idris.idrIdris, dependently-typed functional programming language.
ignore.gitignoreGit and tool ignore-pattern files.
inform7.ni, .i7xInform 7, natural language interactive fiction authoring system.
ini.iniINI, simple key-value configuration file format.
io.ioIo, prototype-based OOP language with concurrency primitives.
j.ijsJ, high-performance array programming language (successor to APL).
java.javaJava, OOP language for the JVM.
javascript.js, .es, .es6, .mjs, .cjsJavaScript, scripting language for the web and Node.js.
jolie.ol, .iolJolie, service-oriented programming language for microservices.
jq.jqjq, JSON query and transformation language.
json.json, .map, .jsonld, .jsonc, .webmanifestJSON, 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.
kusto.kqlKQL/Kusto, Azure Data Explorer and Log Analytics query language.
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.
liquid.liquidLiquid, Shopify's safe customer-facing templating language.
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.
lolcode.lolLOLCODE, humorous esoteric programming language.
lua.luaLua, lightweight embeddable scripting language.
makefile.mk, .mak, .make; files BSDmakefile, GNUmakefile, Makefile, makefileGNU Make build scripts.
markdown.md, .markdown, .mkdMarkdown, lightweight markup language. Fenced code blocks are tokenized independently by language.
markup.html, .htm, .xml, .xsl, .xslt, .svg, .ejs, .jsp, .xhtmlHTML, XML, SVG, and similar markup languages.
matlab.matlabMATLAB, matrix-oriented numerical computing language.
mel.melMEL, Maya Embedded Language for Autodesk Maya automation.
mermaid.mmd, .mermaidMermaid, diagram-as-code definition language.
mizar.mizMizar, formal mathematics and proof assistant language.
mongodb.mongodbMongoDB shell and aggregation pipeline query language.
monkey.monkey, .monkey2Monkey, cross-platform game development language.
n1ql.n1qlN1QL, Couchbase's SQL-like query language for JSON documents.
n4js.n4js, .n4jsdN4JS, typed JavaScript superset by NumberFour.
nasm.asm, .nasm, .nasNASM, Netwide Assembler x86 assembly syntax.
nginx.nginx, .nginxconf; files nginx.confNginx web server configuration files.
nim.nim, .nims, .nimbleNim, statically-typed compiled systems language.
nix.nixNix, purely functional package manager configuration language.
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.
odin.odinOdin, data-oriented systems programming language.
opencl.openclOpenCL, open standard for parallel programming across CPUs and GPUs.
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.
processing.pdeProcessing, visual arts and creative coding language.
prolog.proProlog, logic programming language.
promql.promqlPromQL, Prometheus time-series query 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.
pure.purePure, functional language based on term rewriting.
purescript.pursPureScript, strongly-typed functional language compiling to JavaScript.
python.py, .pyi, .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.
reason.re, .reiReasonML, OCaml-based language with JavaScript-friendly syntax.
regex.regex, .regexpRegular expression patterns.
rego.regoRego, Open Policy Agent (OPA) policy language.
renpy.rpyRen'Py, visual novel scripting language.
rescript.resReScript, fast typed language compiling to JavaScript.
rest.rst, .restreStructuredText, documentation markup language used in Sphinx.
rip.ripRip, object-oriented scripting language.
robotframework.robotRobot Framework, acceptance testing and RPA framework DSL.
ruby.rb, .rake, .gemspec, .ru, .podspec, .jbuilder, .thor; files Berksfile, Brewfile, Capfile, Dangerfile, Fastfile, Gemfile, Guardfile, Podfile, Rakefile, Thorfile, VagrantfileRuby, 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.scala, .sbtScala, OOP and functional language for the JVM.
scheme.scm, .ssScheme, minimalist Lisp dialect.
scss.scssSCSS, Sass CSS extension with C-style bracket syntax.
shell-session.sh-sessionShell session transcripts with prompt markers.
smali.smaliSmali, Android Dalvik bytecode assembly language.
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.
stata.do, .ado, .mataStata, statistical analysis and data management language.
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.toml; files PipfileTOML, 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.
typoscript.typoscriptTypoScript, TYPO3 CMS configuration and templating language.
unrealscript.ucUnrealScript, scripting language for Unreal Engine 3.
vala.vala, .vapiVala, OOP language that compiles to C for GNOME applications.
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.
vim.vim; files .exrc, .gvimrc, .vimrc, _vimrc, gvimrc, vimrcVimScript, Vim editor scripting and configuration language.
visual-basic.vbs, .vba
vue.vueVue Single-File Component, combining template, script, and style blocks.
wasm.wat, .wastWebAssembly text format (WAT).
wgsl.wgslWGSL, WebGPU Shading Language.
wiki.wiki, .mediawiki, .wikitextMediaWiki markup language.
wolfram.wl, .nbWolfram Language, symbolic language used in Mathematica.
xojo.xojo_code, .xojo_script, .xojo_window, .xojo_menu, .xojo_report, .xojo_toolbarXojo, cross-platform RAD development language.
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 a file association

Activate one of these with --formats-exts "<format>:<ext>[,<ext>]" or --formats-names "<format>:<name>[,<name>]".

FormatDescription
arffARFF, Weka attribute-relation file format for machine learning datasets.
armasmARM assembly language.
asm6502MOS 6502 assembly language.
clike
comments
cspContent Security Policy header files.
css-extrasExtended CSS at-rules and selector patterns.
flowFlow, Facebook's static type checker annotations for JavaScript.
gcodeG-code, CNC machine tool programming language.
gedcomGEDCOM, genealogical data interchange format.
gitGit configuration and commit message files.
gmlGML, GameMaker Language for game logic and events.
hpkp
hsts
ichigojamIchigoJam BASIC, beginner BASIC for the IchigoJam microcomputer.
keymap
parigpPARI/GP, computer algebra system scripting language.
qoreQore, high-level multi-threaded programming language.
roboconfRoboconf, graph-based distributed application deployment language.
uri
xeoraXeora, ASP.NET-style web framework template language.

Code fence aliases

A Markdown code fence tagged with one of these names is read in the format next to it:

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