high-energy-55500
01/30/2024, 1:58 PM.github/? i’m trying to use pants to lint my workflow files, but yamllint seems to be ignoring those files altogether (yamllint . raises errors but pants lint :: says yamllint passed without any errors). I thought the issue might be that i needed to add a resources target, but the file is ignored by pants in the .github/ directory.
(see in thread)high-energy-55500
01/30/2024, 1:58 PM/BUILD
resources(
name="yml-one",
sources=[".github/dependabot.yml"],
)
resources(
name="yml-two",
sources=["github/dependabot.yml"],
)
➜ ✗ touch .github/dependabot.yml
➜ ✗ touch github/dependabot.yml
➜ ✗ pants dependencies --transitive //:yml-one
13:54:46.78 [WARN] Unmatched glob from //:yml-one's `sources` field: ".github/dependabot.yml"
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to <https://www.pantsbuild.org/v2.19/docs/troubleshooting#pants-cannot-find-a-file-in-your-project>.
➜ ✗ pants dependencies --transitive //:yml-two
//github/dependabot.yml:../yml-twogorgeous-winter-99296
01/30/2024, 2:14 PMcurved-television-6568
01/30/2024, 2:19 PMhigh-energy-55500
01/30/2024, 2:24 PMpants_ignore so I didn’t understand why it would be getting ignoredhigh-energy-55500
01/30/2024, 2:26 PM.gitignore? seems more intuitive to me 🤷♂️curved-television-6568
01/30/2024, 2:26 PMpants_ignore could be included in that message making it more illustrative.curved-television-6568
01/30/2024, 2:27 PMcurved-television-6568
01/30/2024, 2:29 PM!.github by default as well, as those files are more of a source code kind..fresh-cat-90827
01/30/2024, 4:55 PMpants lint .github::
diff --git a/pants.toml b/pants.toml
index 6d2dd3d..adae927 100644
--- a/pants.toml
+++ b/pants.toml
@@ -4,10 +4,12 @@ ignore_warnings = [
'$regex$DEPRECATED',
]
pythonpath = ["%(buildroot)s/pants-plugins"]
+pants_ignore.add = ["!.github/" ]
backend_packages = [
"pants.backend.shell",
"pants.backend.python",
+ "pants.backend.experimental.tools.yamllint",
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.docformatter",fresh-cat-90827
01/30/2024, 4:56 PM.add syntax that Pants is able to parsefresh-cat-90827
01/30/2024, 4:57 PMfresh-cat-90827
01/30/2024, 5:11 PM.github directory sounds sensible to me, I raised https://github.com/pantsbuild/pants/pull/20471high-energy-55500
01/30/2024, 5:39 PM.github/