commit | f400ab78925858efc56cda3214b913049a6b999d | [log] [tgz] |
---|---|---|
author | Oliver Newman <olivernewman@google.com> | Wed Jul 19 14:46:41 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 19 14:46:41 2023 +0000 |
tree | 693edada3c2a8f24588ef32627a99ec2a3c8de55 | |
parent | 6065391ce87eb00744a4277453453ec1cd702018 [diff] |
[scm] Include untracked files in analysis It's more user-friendly to consider untracked files in analysis so that users can get feedback on new files without needing to stage them first. It's especially important for `shac check` to run untracked `shac.star` files, otherwise people get confusing "no shac.star files found" errors when adding a shac.star file to a repo, until they `git add` it. The existence of untracked files does not affect the choice of which commit to use as the "upstream", to accomodate users who tend to keep untracked files sitting around. It's okay to include those files in the analysis, but the existence of those files shouldn't prevent other files from being analyzed. Change-Id: I1e5263150eddf79094b69cd2bb0e6a6fa88a0e0a Reviewed-on: https://fuchsia-review.googlesource.com/c/shac-project/shac/+/886295 Reviewed-by: Marc-Antoine Ruel <maruel@google.com> Commit-Queue: Oliver Newman <olivernewman@google.com> Fuchsia-Auto-Submit: Oliver Newman <olivernewman@google.com>
Shac (Scalable Hermetic Analysis and Checks) is a unified and ergonomic tool and framework for writing and running static analysis checks.
Shac checks are written in Starlark.
go install go.fuchsia.dev/shac-project/shac@latest shac check shac doc shac.star | less
Planned features/changes, in descending order by priority:
shac.textproto
shac.star
files.shac
cache directory that checks can write toctx.scm
glob
arguments to ctx.scm.{all,affected}_files()
functions for easier filtering⚠ The source of truth is at https://fuchsia.googlesource.com/shac-project/shac.git and uses Gerrit for code review.
See CONTRIBUTING.md to submit changes.