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)
Tue, May 7, 6:54 AM
Unknown Object (File)
Fri, May 3, 5:37 AM
Unknown Object (File)
Mon, Apr 29, 4:11 PM
Unknown Object (File)
Wed, Apr 24, 10:57 PM
Unknown Object (File)
Sat, Apr 20, 6:34 PM
Unknown Object (File)
Thu, Apr 11, 5:11 PM
Unknown Object (File)
Thu, Apr 11, 8:48 AM
Unknown Object (File)
Thu, Apr 11, 8:17 AM

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