cool_linter 1.1.0 copy "cool_linter: ^1.1.0" to clipboard
cool_linter: ^1.1.0 copied to clipboard

outdated

linter for analyzing dart code by RegExp pattern

Pub Version Dart SDK Version Pub popularity

Cool linter #

This is a custom linter package for dart/flutter code. It can set linter for exclude some of words. This words you can set in analysis_options.yaml by example below

Usage #

1. Add dependency to pubspec.yaml #

```yaml
dev_dependencies:
  cool_linter: ^1.0.1 # last version of plugin
```

2. Add configuration to analysis_options.yaml #

```yaml
analyzer:
  plugins:
    - cool_linter

cool_linter:
  exclude_words:
    -
      pattern: Colors
      hint: Use colors from design system instead!
      severity: WARNING
    -
      pattern: Test123{1}
      severity: ERROR
  exclude_folders:
    - test/**
    - lib/ku/**
```
  • pattern - RegExp-pattern, for example: Test123{1}, ^Test123$ and others
  • severity - [optional parameter]. It is console information level. May be WARNING, INFO, ERROR. Default is WARNING
  • hint - [optional parameter]. It is console information sentence
  • exclude_folders - this folders linter will ignore. By default excluded folders are:
'.dart_tool/**',
'.vscode/**',
'packages/**',
'ios/**',
'macos/**',
'web/**',
'linux/**',
'windows/**',
'go/**',

Attention!!! #

You must restart your IDE for starting plugin #

3. Result #

Screenshot Screenshot Screenshot