Skip to content

Skip Node/TS subtrees and gitignored files in workspace validate#137

Open
zekelinAlex wants to merge 2 commits into
TALXIS:masterfrom
zekelinAlex:users/alexander.zekelin/issue-74-validate-ignore-rules
Open

Skip Node/TS subtrees and gitignored files in workspace validate#137
zekelinAlex wants to merge 2 commits into
TALXIS:masterfrom
zekelinAlex:users/alexander.zekelin/issue-74-validate-ignore-rules

Conversation

@zekelinAlex
Copy link
Copy Markdown

Closes #74.

workspace validate was running Dataverse XSD/JSON validation against
every file in the workspace, which produced a wall of false errors in
any repo with a PCF control or a TypeScript subproject. node_modules
contents, tsconfig.json, package-lock.json, eslintrc, you name it.
None of those are Dataverse metadata, but the validator didn't know.

Now the command filters before reporting:

  • well-known throwaway dirs are skipped (node_modules, bin, obj, out, dist, .git, .vs, .idea, .vscode, .cache, .nuget, coverage)
  • the workspace .gitignore is honored (basic semantics: directory-only, anchored, ** wildcards; negations are no-ops)
  • any directory containing a package.json marks the whole subtree as a Node/TS project and gets skipped, which covers tsconfig.json, package.json itself, lockfiles, lint configs without a hand-curated allowlist

Two escape hatches: --no-ignore turns everything off (original
behaviour), --no-gitignore keeps defaults + node-project detection
but ignores .gitignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

txc workspace validate runs validation on node_modules and other ignored files

1 participant