Page MenuHomePhabricator

Keep the generated code collapsed if there are only lint warnings inline
AbandonedPublic

Authored by sowedance on Mar 6 2014, 6:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 8:37 AM
Unknown Object (File)
Fri, Dec 6, 10:37 PM
Unknown Object (File)
Tue, Nov 26, 5:29 PM
Unknown Object (File)
Nov 18 2024, 4:47 AM
Unknown Object (File)
Nov 13 2024, 7:28 PM
Unknown Object (File)
Nov 10 2024, 3:48 PM
Unknown Object (File)
Nov 9 2024, 5:21 PM
Unknown Object (File)
Oct 23 2024, 10:00 PM

Details

Summary

Occasionally we have some lint warnings in the generated files and users normally want to skip it. Only the tool developers who write code generating tools will be interested in them.
Keep the generated files collapsed if the comments are only lint warnings.

Test Plan

Tried it with some diff and it works.

Diff Detail

Repository
rP Phabricator
Branch
suppresslint
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

The ArcanistGeneratedLinter calls stopAllLinters(), which should prevent other linters from raising lint messages in generated files. Have you explicitly disabled/prevented this? Are the projects in question not using the Generated linter?

I didn't notice that. Yeah let me check.

One trick (which caught @mroch, at least) is that we made linter priority explicit some time September-ish. Before the change, we ran linters in the order you added them in the Engine. Now, each linter has an explicit priority (given by getLinterPriority()), and we sort linters by their priority instead.

This makes it easier to get things right in the common case (where you're just adding a bunch of normal linters and don't want to have to go look up their sequencing rules) but might have changed the behavior of existing Engines which relied on implicit sequencing. Similarly, if any linters have been set to a priority smaller than 0.25 explicitly, they'll run before the GeneratedLinter.

Finally, linters can sometimes raise messages in files other than the file they're linting. We might not be handling or excluding these messages correctly.

epriestley edited edge metadata.

(Just pushing this out of my queue.)

This revision now requires changes to proceed.Mar 31 2014, 5:06 PM