Ignorelint
Supported output formats for lint results.
Each value corresponds to a concrete Formatter subclass:
Human→HumanFormatter— colored terminal outputJson→JsonFormatter— machine-readable JSONCheckstyle→CheckstyleFormatter— XML for CI integrationsSarif→SarifFormatter— SARIF 2.1.0 for GitHub Advanced Security
Crystal enums are value types (like structs). Each member gets an integer
index starting at 0. You can pattern-match on them with case using the
when .human? shorthand (the ? is a macro-generated predicate method).
Constants
Machine-readable diagnostic codes for every known lint rule.
Each code maps to a human-readable "IG-NNN" tag via #tag. The tag
appears in all output formats (human, JSON, Checkstyle, SARIF) so users
can suppress or search for specific rules.
The naming convention is CamelCase for the Crystal enum member and
snake_case for the :symbol used in Issue.new(...).
Human-readable rule titles, e.g. for SARIF shortDescription.
The set of Code values that can be automatically fixed.
This is a module-level constant (created once at program startup) because
it never changes. Set gives O(1) lookups via includes?.
Master registry of all recognized *ignore filenames → their FileType.
Used by:
CLI.find_ignore_filesto auto-discover files in the current directoryIgnorelint.file_type_from_pathto determine which format linter to use
The type annotation of String => FileType tells Crystal this is a
Hash(String, FileType), ensuring type safety at compile time.
Every known diagnostic tag in upper case, for override validation.
Class methods
Resolve a file path to its FileType by looking up the basename.
Returns FileType::Unknown for unrecognized filenames.
Check whether a filename (e.g. ".gitignore") is a recognized *ignore file.
Nested types
- Ignorelint::CLI
- Ignorelint::CfignoreStyleLinter
- Ignorelint::Checks
- Ignorelint::CheckstyleFormatter
- Ignorelint::Code
- Ignorelint::DockerignoreStyleLinter
- Ignorelint::EslintignoreStyleLinter
- Ignorelint::FileResult
- Ignorelint::FileType
- Ignorelint::Fix
- Ignorelint::Fixer
- Ignorelint::FormatLinter
- Ignorelint::FormatLinterRegistry
- Ignorelint::Formatter
- Ignorelint::GitignoreStyleLinter
- Ignorelint::HelmignoreStyleLinter
- Ignorelint::HumanFormatter
- Ignorelint::Issue
- Ignorelint::JsonFormatter
- Ignorelint::LintResult
- Ignorelint::Linter
- Ignorelint::NpmignoreStyleLinter
- Ignorelint::NullFormatLinter
- Ignorelint::OutputFormat
- Ignorelint::Parser
- Ignorelint::Pattern
- Ignorelint::PolicySettings
- Ignorelint::PrettierignoreStyleLinter
- Ignorelint::ProjectfilePolicy
- Ignorelint::SarifFormatter
- Ignorelint::Severity
- Ignorelint::SlugignoreStyleLinter