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
Refactor lint rules #16268
Merged
gsnedders
merged 2 commits into
web-platform-tests:master
from
bocoup:refactor-lint-rules
Apr 19, 2019
Merged
Refactor lint rules #16268
gsnedders
merged 2 commits into
web-platform-tests:master
from
bocoup:refactor-lint-rules
Apr 19, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduce additional structure to the definition of linting rules. This change is in support of a planned improvement to the project's documentation generator; this structure will allow user documentation to be generated procedurally from the source code.
jugglinmike
force-pushed
the
refactor-lint-rules
branch
from
April 16, 2019 17:35
15cac6a
to
c0d9b9c
Compare
Rebased over gh-16349. @gsnedders can you please review and merge if this looks good to you? |
gsnedders
approved these changes
Apr 19, 2019
Thanks! |
jugglinmike
added a commit
to bocoup/wpt
that referenced
this pull request
Jun 5, 2019
When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests#5299 [2] web-platform-tests#10501 [3] web-platform-tests#11479 [4] web-platform-tests#16268
jugglinmike
added a commit
to bocoup/wpt
that referenced
this pull request
Jun 5, 2019
When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests#5299 [2] web-platform-tests#10501 [3] web-platform-tests#11479 [4] web-platform-tests#16268
jugglinmike
added a commit
to bocoup/wpt
that referenced
this pull request
Sep 5, 2019
When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests#5299 [2] web-platform-tests#10501 [3] web-platform-tests#11479 [4] web-platform-tests#16268
jugglinmike
added a commit
to bocoup/wpt
that referenced
this pull request
Nov 11, 2019
When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests#5299 [2] web-platform-tests#10501 [3] web-platform-tests#11479 [4] web-platform-tests#16268
jugglinmike
added a commit
that referenced
this pull request
Nov 14, 2019
When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] #5299 [2] #10501 [3] #11479 [4] #16268
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Nov 29, 2019
…, a=testonly Automatic update from web-platform-tests [docs] Generate linting docs from source (#17189) When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests/wpt#5299 [2] web-platform-tests/wpt#10501 [3] web-platform-tests/wpt#11479 [4] web-platform-tests/wpt#16268 -- wpt-commits: 204072e843f69e3a13628c01a928ea99aebed978 wpt-pr: 17189
xeonchen
pushed a commit
to xeonchen/gecko
that referenced
this pull request
Nov 29, 2019
…, a=testonly Automatic update from web-platform-tests [docs] Generate linting docs from source (#17189) When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests/wpt#5299 [2] web-platform-tests/wpt#10501 [3] web-platform-tests/wpt#11479 [4] web-platform-tests/wpt#16268 -- wpt-commits: 204072e843f69e3a13628c01a928ea99aebed978 wpt-pr: 17189
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Nov 30, 2019
…, a=testonly Automatic update from web-platform-tests [docs] Generate linting docs from source (#17189) When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests/wpt#5299 [2] web-platform-tests/wpt#10501 [3] web-platform-tests/wpt#11479 [4] web-platform-tests/wpt#16268 -- wpt-commits: 204072e843f69e3a13628c01a928ea99aebed978 wpt-pr: 17189 UltraBlame original commit: 56fc8b1c2e129a595c1bee4822ea5c07ee630404
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Nov 30, 2019
…, a=testonly Automatic update from web-platform-tests [docs] Generate linting docs from source (#17189) When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests/wpt#5299 [2] web-platform-tests/wpt#10501 [3] web-platform-tests/wpt#11479 [4] web-platform-tests/wpt#16268 -- wpt-commits: 204072e843f69e3a13628c01a928ea99aebed978 wpt-pr: 17189 UltraBlame original commit: 56fc8b1c2e129a595c1bee4822ea5c07ee630404
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Nov 30, 2019
…, a=testonly Automatic update from web-platform-tests [docs] Generate linting docs from source (#17189) When new rules have been added to WPT's "lint" tool, the corresponding documentation has not always been updated [1] [2] [3]. The static list of rules currently describes only 22 of the 53 available rules. Automatically generating documentation from source code helps avoid this state and the confusion it can cause contributors. Rely on the previously-implemented source code structure [4] during documentation generation to automatically create a listing of all available linting rules. Although the Sphinx documentation generator includes a built-in extension for generating documentation from Python source code, the output of that extension is designed to document Python primitives such as functions and classes. Such a format is inappropriate for this case because the users of the linting tool do not interact with the internals in this way. Define a custom docutils directive to tailor the documentation to the needs of its audience. [1] web-platform-tests/wpt#5299 [2] web-platform-tests/wpt#10501 [3] web-platform-tests/wpt#11479 [4] web-platform-tests/wpt#16268 -- wpt-commits: 204072e843f69e3a13628c01a928ea99aebed978 wpt-pr: 17189 UltraBlame original commit: 56fc8b1c2e129a595c1bee4822ea5c07ee630404
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in gh-15824, we're revamping WPT's documentation in a fork of the project. We'd like to automatically generate rules for the project's linter, and that requires some change to the source code. In the initial proposal for that improvement, @jgraham wrote:
This is the requested change.
Because not all rules are backed with unit tests, the first commit in this patch improves coverage. Two rules remain uncovered:
IGNORED PATH
- because this rule integrates with git and the filesystem, testing it effectively is non-trivialMALFORMED-VARIANT
- the application code has an assertion guarding against thiscase which resists attempts to test. Should we change the assertion to a
raise
and remove the linting rule?