hi what doe the `--check` commands do. following t...
# general
a
hi what doe the
--check
commands do. following the CI tutorial and got the following output when running
./pants tailor --check update-build-files --check
Copy code
[WARN] No arguments specified with `./pants tailor`, so the goal will do nothing.

Instead, you should provide arguments like this:

  * `./pants tailor ::` to run on everything
  * `./pants tailor dir::` to run on `dir` and subdirs
  * `./pants tailor dir` to run on `dir`
  * `./pants --changed-since=HEAD tailor` to only run on changed and new files
13:28:03.85 [WARN] No arguments specified with `./pants update-build-files`, so the goal will do nothing.

Instead, you should provide arguments like this:

  * `./pants update-build-files ::` to run on everything
  * `./pants update-build-files dir::` to run on `dir` and subdirs
  * `./pants update-build-files dir` to run on `dir`
  * `./pants update-build-files dir/BUILD` to run on that single BUILD file
  * `./pants --changed-since=HEAD update-build-files` to run only on changed BUILD files
w
I haven't seen that tutorial recently, but it should run in "check-only" mode, so it doesn't try to add/re-write any code
a
how do I do that
You're missing targets
So, like...
./pants --changed-since=origin/main fmt
Will run format only on changed files
Alternatively:
./pants fmt ::
will run format on all targets
Following the CI doc, you need the
changed-since
piece for your original command to work
a
so like this
./pants --changed-since=origin/main tailor ::  --changed-since=origin/main update-build-files  ::
i think i need to split these two commands right
w
You can chain commands, so following the tutorial: https://www.pantsbuild.org/docs/using-pants-in-ci#approach-1-only-run-over-changed-files
Copy code
❯ ./pants \
  --changed-since=origin/main \
  tailor --check \
  update-build-files --check \
  lint
That's 1 line, multiple commands
This provides some information on running goals: https://www.pantsbuild.org/docs/goals#running-goals
a
so what i found out is
./pants --changed-since=origin/main tailor \ --changed-since=origin/main update-build-files
can't be run together due to this
Copy code
You used `--changed-since` at the same time as using directory arguments. You can only use `--changed-since` or use normal arguments.
w
You only need changed-since once and it applies to both goals.
1