Skip to main content

Interface: CSpellApplicationOptions

Defined in: cspell/src/app/options.ts:213

Extends

  • LinterOptions

Properties

cache?

optional cache: boolean

Defined in: cspell/src/app/util/cache/CacheOptions.ts:12

Store the info about processed files in order to only operate on the changed ones.

Inherited from

LinterOptions.cache


cacheFormat?

optional cacheFormat: CacheFormat

Defined in: cspell/src/app/util/cache/CacheOptions.ts:38

Format of the cache file.

  • legacy - use absolute paths in the cache file
  • universal - use a sharable format.

Default

'legacy'

Inherited from

LinterOptions.cacheFormat


cacheLocation?

optional cacheLocation: string

Defined in: cspell/src/app/util/cache/CacheOptions.ts:20

Path to the cache location. Can be a file or a directory. If none specified .cspellcache will be used. The file will be created in the directory where the cspell command is executed.

Inherited from

LinterOptions.cacheLocation


cacheReset?

optional cacheReset: boolean

Defined in: cspell/src/app/util/cache/CacheOptions.ts:30

Resets the cache

Inherited from

LinterOptions.cacheReset


cacheStrategy?

optional cacheStrategy: CacheStrategy

Defined in: cspell/src/app/util/cache/CacheOptions.ts:25

Strategy to use for detecting changed files, default: metadata

Inherited from

LinterOptions.cacheStrategy


color?

optional color: boolean

Defined in: cspell/src/app/options.ts:210

Use color in the output. true to force color, false to turn off color. undefined to use color if the output is a TTY.

Inherited from

LinterOptions.color


config?

optional config: string | CSpellConfigFile

Defined in: cspell/src/app/options.ts:107

Path to configuration file.

Inherited from

LinterOptions.config


debug?

optional debug: boolean

Defined in: cspell/src/app/options.ts:13

Show extensive output.

Inherited from

LinterOptions.debug


defaultConfiguration?

optional defaultConfiguration: boolean

Defined in: cspell/src/app/options.ts:185

Load the default configuration

Default

true

Inherited from

LinterOptions.defaultConfiguration


dot?

optional dot: boolean

Defined in: cspell/src/app/options.ts:35

Determine if files / directories starting with . should be part of the glob search.

Default

false

Inherited from

LinterOptions.dot


exclude?

optional exclude: string | string[]

Defined in: cspell/src/app/options.ts:17

a globs to exclude files from being checked.

Inherited from

LinterOptions.exclude


exitCode?

optional exitCode: boolean

Defined in: cspell/src/app/options.ts:196

Return an exit code if there are issues found.

Default

true

Inherited from

LinterOptions.exitCode


failFast?

optional failFast: boolean

Defined in: cspell/src/app/options.ts:91

Stop processing and exit if an issue or error is found.

Inherited from

LinterOptions.failFast


file?

optional file: string[]

Defined in: cspell/src/app/options.ts:76

Alias of LinterOptions.files.

Inherited from

LinterOptions.file


fileList?

optional fileList: string[]

Defined in: cspell/src/app/options.ts:63

List of files that contains the paths to files to be spell checked. The files in the lists will be filtered against the glob patterns.

  • an entry of stdin means to read the file list from stdin The resulting files are filtered against the files globs found in the configuration.

Inherited from

LinterOptions.fileList


files?

optional files: string[]

Defined in: cspell/src/app/options.ts:71

List of file paths to spell check. These can be relative or absolute paths, but not Globs. Relative paths are relative to LinterOptions.root. The files are combined with the file paths read from LinterOptions.fileList. These files are filtered against the files globs found in the configuration.

Inherited from

LinterOptions.files


filterFiles?

optional filterFiles: boolean

Defined in: cspell/src/app/options.ts:81

Use the files configuration to filter the files found.

Inherited from

LinterOptions.filterFiles


flag?

optional flag: string[]

Defined in: cspell/src/app/options.ts:203

Execution flags. Used primarily for releasing experimental features. Flags are of the form key:value

Inherited from

LinterOptions.flag


gitignore?

optional gitignore: boolean

Defined in: cspell/src/app/options.ts:50

Enable filtering out files matching globs found in .gitignore files.

Inherited from

LinterOptions.gitignore


gitignoreRoot?

optional gitignoreRoot: string | string[]

Defined in: cspell/src/app/options.ts:55

Stop searching for a .gitignores when a root is reached.

Inherited from

LinterOptions.gitignoreRoot


issues?

optional issues: boolean

Defined in: cspell/src/app/options.ts:225

Show issues


issuesSummaryReport?

optional issuesSummaryReport: boolean

Defined in: cspell/src/app/options.ts:247

Generate a summary report of issues.


issueTemplate?

optional issueTemplate: string

Defined in: cspell/src/app/options.ts:282

Set the template to use when reporting issues.

The template is a string that can contain the following placeholders:

  • $filename - the file name
  • $col - the column number
  • $row - the row number
  • $text - the word that is misspelled
  • $message - the issues message: "unknown word", "word is misspelled", etc.
  • $messageColored - the issues message with color based upon the message type.
  • $uri - the URI of the file
  • $suggestions - suggestions for the misspelled word (if requested)
  • $quickFix - possible quick fixes for the misspelled word.
  • $contextFull - the full context of the misspelled word.
  • $contextLeft - the context to the left of the misspelled word.
  • $contextRight - the context to the right of the misspelled word.

Color is supported using the following template pattern:

  • {<style[.style]> <text>} - where <style> is a style name and <text> is the text to style.

Styles

  • bold, italic, underline, strikethrough, dim, inverse
  • black, red, green, yellow, blue, magenta, cyan, white

Example:

Example

"{green $filename}:{yellow $row}:{yellow $col} $message {red $text} $quickFix {dim $suggestions}"

Since

8.12.0


languageId?

optional languageId: string

Defined in: cspell/src/app/options.ts:175

Programming Language ID.

Inherited from

LinterOptions.languageId


legacy?

optional legacy: boolean

Defined in: cspell/src/app/options.ts:217

Show legacy output


locale?

optional locale: string

Defined in: cspell/src/app/options.ts:179

Locale to use.

Inherited from

LinterOptions.locale


mustFindFiles?

optional mustFindFiles: boolean

Defined in: cspell/src/app/options.ts:242

Files must be found or cli will exit with an error.

Overrides

LinterOptions.mustFindFiles


progress?

optional progress: boolean

Defined in: cspell/src/app/options.ts:234

Show progress


relative?

optional relative: boolean

Defined in: cspell/src/app/options.ts:238

issues are shown with a relative path to the root or cwd


reporter?

optional reporter: string[]

Defined in: cspell/src/app/options.ts:97

Optional list of reporters to use, overriding any specified in the configuration.

Inherited from

LinterOptions.reporter


root?

optional root: string

Defined in: cspell/src/app/options.ts:29

root directory, defaults to cwd

Inherited from

LinterOptions.root


showContext?

optional showContext: number | boolean

Defined in: cspell/src/app/options.ts:41

Show part of a line where an issue is found. if true, it will show the default number of characters on either side. if a number, it will shat number of characters on either side.

Inherited from

LinterOptions.showContext


showPerfSummary?

optional showPerfSummary: boolean

Defined in: cspell/src/app/options.ts:252

Generate a summary report of performance.


showSuggestions?

optional showSuggestions: boolean

Defined in: cspell/src/app/options.ts:45

Show suggestions for spelling errors.

Inherited from

LinterOptions.showSuggestions


silent?

optional silent: boolean

Defined in: cspell/src/app/options.ts:230

Run in silent mode.

Default

false

skipValidation?

optional skipValidation: boolean

Defined in: cspell/src/app/options.ts:102

Load and parse documents, but do not spell check.

Inherited from

LinterOptions.skipValidation


summary?

optional summary: boolean

Defined in: cspell/src/app/options.ts:221

Show summary at the end


unique?

optional unique: boolean

Defined in: cspell/src/app/options.ts:25

unique errors per file only.

Inherited from

LinterOptions.unique


validateDirectives?

optional validateDirectives: boolean

Defined in: cspell/src/app/options.ts:190

Check In-Document CSpell directives for correctness.

Inherited from

LinterOptions.validateDirectives


verbose?

optional verbose: boolean

Defined in: cspell/src/app/options.ts:9

Display verbose information

Inherited from

LinterOptions.verbose


wordsOnly?

optional wordsOnly: boolean

Defined in: cspell/src/app/options.ts:21

Only report the words, no line numbers or file names.

Inherited from

LinterOptions.wordsOnly