Repository navigation
test(rules): pin content/hidden-text keeping code text in its length threshold (repo#1639) - #2264
Merged
Merged
Conversation
…threshold (repo#1639) Signed-off-by: Nik Cubrilovic <[email protected]>
This file contains hidden or 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
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.
Closes the remaining work on private issue repo#1639 (reading-level was fixed in #1931; keyword-stuffing already skips code via getRenderedProseTextWhere and is pinned by the test in that PR).
hidden-text assessment: the rule measures how much indexable text a hidden element carries. A hidden
<pre>/<code>is still text a crawler indexes, and hiding it is what the rule reports, so excluding code would create false negatives and no distortion exists to fix. Rule left unchanged; this PR only adds a test pinning that (hidden prose,<pre>,<code>warn;<script>passes).Test review: (1) fails if hidden-text switched to getProseTextExcludingCode (the pre/code cases would pass); (2) not a copy of an existing test; (3) no security values.
Gates (packages/rules): format:check, lint, typecheck clean; CI rules step
bun run scripts/test-suites.ts --run rules: 12683 pass, 0 fail. make validate not needed (no docs, no new rule, no counts).Agent skill change: not needed.