Skip to content

Commit 9300660

Browse files
committed
chore: cut the LEADING and discover.ts option comments to what the code cannot show
1 parent 94a4bf4 commit 9300660

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

‎.github/scripts/gen-inputs-table.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ const row = lineOf([
5151
backticked,
5252
]);
5353

54-
/** The fixed lines action-docs writes after the opening marker, in its order; the first is the rest of the marker's own
55-
* line, and one row per input then one blank line follow them. A region of blank lines alone (a fresh marker pair) is
56-
* also a rendering's shape. A description never holds a "|" (test/docs/inputs.test.ts). */
54+
/** The first entry is the rest of the opening marker's own line. A "|" in a description would split its rendered row
55+
* past `row`'s four cells and refuse it as authored, so test/docs/inputs.test.ts pins every description free of one. */
5756
const LEADING: ((line: string) => boolean)[] = [
5857
(line) => line === "",
5958
(line) => line === "## Inputs",

‎src/discovery/discover.ts‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,14 @@ export interface ExcludePattern {
8989
}
9090

9191
/**
92-
* `nocase`: repository names compare case-insensitively on GitHub. `dot`: a leading "." is an ordinary character
93-
* in a repository name (".github"), not the hidden-file marker picomatch skips by default. `posix`: "[!ab]" is a
94-
* negated class, as in a shell, instead of a class holding "!". `fastpaths: false`: the shortcut regexes picomatch
95-
* mints for star-led patterns demand a character after a literal dot, so "*.*" would miss "archive."; the full
96-
* parser keeps "*" any run of characters. `debug`: an invalid class like "[z-a]" throws instead of compiling to a
97-
* never-matching regex. `windows: false`: the main entry otherwise follows the host OS, and a slug is a GitHub
98-
* identifier, not a path, so the matcher is the same on every runner. `literalBrackets: false`: a class compiles
99-
* to the class alone, not an alternation with its literal text, which no name holds; thousands of classes then
100-
* compile in milliseconds instead of reaching the engine's size limit.
92+
* picomatch is built for file paths and a slug is a GitHub identifier, so each option is set for a name, none left to its default:
93+
* nocase -> GitHub compares repository names case-insensitively
94+
* dot -> a leading "." is an ordinary name character (".github"), not the hidden-file marker
95+
* posix -> "[!ab]" is a negated class, as in a shell, not a class holding "!"
96+
* fastpaths -> the star-led shortcut regexes demand a character after a literal dot, so "*.*" would miss "archive."
97+
* debug -> an invalid class like "[z-a]" throws instead of compiling to a never-matching regex
98+
* windows -> pinned: only picomatch's main callable reads the host OS; makeRe never does
99+
* literalBrackets -> no alternation with the class's literal text (no name holds it); thousands compile in milliseconds, under the engine's limit
101100
*/
102101
const EXCLUDE_GLOB_OPTIONS = {
103102
nocase: true,

0 commit comments

Comments
 (0)