Skip to content

Commit

Permalink
add precommit-alias (#28)
Browse files Browse the repository at this point in the history
* add precommit-alias
  • Loading branch information
tgolsson authored Apr 11, 2023
1 parent 9cd2619 commit 817b7df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions docs/src/cheats.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,17 @@ $ pants local-emote ../path/to/emote
```

As with cloud versions, you'll have to rerun the script when the code changes on disk. Pants does not automatically check it.

#### Run CI precommit locally

On files changed since latest (fetched) main:

```shell
$ pants precommit all-changed
```

On all files:

```shell
$ pants precommit ::
```
3 changes: 2 additions & 1 deletion pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ backend_packages = [
"pants_backend_oci",
]


[cli.alias]
precommit = "fmt lint check tailor test"
all-changed = "--changed-since=origin/main --changed-dependees=transitive"
local-emote = "run scripts/local-emote.py --"

[source]
Expand Down

0 comments on commit 817b7df

Please sign in to comment.