tenhobi/effective_dart

Excluding files

michaldev opened this issue · 9 comments

Hi,
How can I set files to ignoring?
I have generated code (intl), and I don't want notifications about that. "Exclude" parameter doesn't work.

Hi, in the Readme, there is a whole chapter about suppressing lints. ;) Let me know if you need any more help.

But I don't want ignoring any suppressing. I would like ignore all suppressing in specifics files.

Oh, I see. Then you can probably exclude those files https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis ?

I am closing this for now. Feel free to add additional info or questions. :-)

It doesn't work. When I add that file for ignore it work for all files. On default linter ignore works good, but on effective_dart - no.

This is not related to this package, however, show me your config.

If I set this:

  rules:
    public_member_api_docs: false
    exclude:
      - lib/generated/**

linter doesn't work for all files. When I remove 'exclude' option, this work correctly, but for all files.

If I set this:

linter:
  rules:
    public_member_api_docs: false

analyzer:
    exclude:
      - lib/generated/**

linter works, but for all files. Ignore option doesn't work.

I think there is no exclude for linter, but for analyzer there is and should work... https://dart.dev/guides/language/analysis-options#the-analysis-options-file and https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis

From what I see and I know, your second example is correct. If that doesn't work as you intend and think that is wrong, write to the analyzer or linter repo

I tried


analyzer:
  exclude: [test/**]
linter:
  rules:
    public_member_api_docs: false
    lines_longer_than_80_chars: false
    use_setters_to_change_properties: false
    one_member_abstracts: false
    unnecessary_brace_in_string_interps: false

and didnt works