Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address user confusion about excluding files #5133

Open
bwilkerson opened this issue Aug 21, 2023 · 1 comment
Open

Address user confusion about excluding files #5133

bwilkerson opened this issue Aug 21, 2023 · 1 comment
Labels
e1-hours Can complete in < 8 hours of normal, not dedicated, work p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged t.cli-tools Relates to the dart command line tools t.diagnostics Relates to diagnostics, analysis, or linting of code

Comments

@bwilkerson
Copy link
Member

Page URL

https://dart.dev/tools/analysis#excluding-files

Page source

No response

Describe the problem

Some users appear to be confused about exactly what it means to exclude a file from analysis using the exclude: key in the analyzer section of the analysis options file. I think some users assume that it means that the analyzer won't open and analyze the file under any conditions, and that's not the case. I think we can address this confusion by expanding the description.

Expected fix

I would propose adding something like the following to the section to clarify the actual impact of including a file in this section.


Note that adding a file, or a glob matching a file, to this section doesn't guarantee that the file will not be analyzed. The analyzer will still perform some analysis of excluded files if they are referenced from some other file that's being analyzed or if they are explicitly opened in the IDE.

What it does guarantee is that

  • the analyzer won't analyze the file unless it needs to, and
  • no diagnostics will be reported for the file.

Even if the analyzer needs to analyze an excluded file it can skip any portions of the normal analysis that aren't necessary.

Additional context

No response

@bwilkerson
Copy link
Member Author

@jacob314 @srawlins

@parlough parlough added p2-medium Necessary but not urgent concern. Resolve when possible. t.cli-tools Relates to the dart command line tools analysis t.diagnostics Relates to diagnostics, analysis, or linting of code e1-hours Can complete in < 8 hours of normal, not dedicated, work labels Aug 21, 2023
@atsansone atsansone added the st.triage.ltw Indicates Lead Tech Writer has triaged label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e1-hours Can complete in < 8 hours of normal, not dedicated, work p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged t.cli-tools Relates to the dart command line tools t.diagnostics Relates to diagnostics, analysis, or linting of code
Projects
None yet
Development

No branches or pull requests

3 participants