commit | d559295a709d6878205b6d09e797368747d7aa4b | [log] [tgz] |
---|---|---|
author | Marc-Antoine Ruel <maruel@google.com> | Wed May 24 18:48:28 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed May 24 18:48:28 2023 +0000 |
tree | a3f2ab8a5423e61d932ad33df515b5fd0c3cd9f0 | |
parent | b5559a0dc718e120523e171b053813b391f820da [diff] |
[engine] fix a race condition and optimize more The race condition was before file.path was hacked in. The regression was added in c7b072f2103221501544b47bd245488e402d8569. Remove the hack and make the implementations immutable. Cache intermediary values for ctx.scm.affected_files() and ctx.scm.all_files(). Reuse new_lines() content across subdir. This removes all duplicate calls to new_lines(). Change-Id: Ia5f1d506f15d541f94e4f1836664d426d3d25fa9 Reviewed-on: https://fuchsia-review.googlesource.com/c/shac-project/shac/+/861258 Reviewed-by: Oliver Newman <olivernewman@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Fuchsia-Auto-Submit: Marc-Antoine Ruel <maruel@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
⚠ 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.