liquid-labs / liquid-labs/liq-cli
`projects audit` should leave a trail.
- Dominant language
- HTML
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
## Overview
Generate a durable record of the last audit.
To avoid weird merges, combine this issue with #117 if not already done.
Also, this will use helper functions described in #103, which should be completed first.
## Deliverables
* [ ] `liq audit` should save the audit results (npm security audit and lint) to `~/meta` (where '~` is the project/repo root). Note that the 'version check' audit is currently strictly interactive and outside the scope of the current work.
* [ ] Generate `./meta/last-audited` if the repo is clean at the time of the test (use `requireCleanRepo` (? I think it's called) and see below for file contents.
* [ ] If the repo is not clean, then `echowarn "Audit complete, but no durable record generated as repo is not clean."
* [ ] Write `projectsLintRequired` in `~/src/actions/projects/lib.sh` to test whether to skip lint. See #103 for `projectHasFunctionalChange`. If `--lint` or `--all` options are explicitly specified, then skip then `projectsLintRequired` should always be true.
* [ ] Add unit test for `projectLintRequired`
* [ ] Update `liq projects audit` to use `projectsLintRetest` and skip the lint with an informational echo as appropriate.
* [ ] Update the projects `help.sh` to describe the behavior vis-a-vie lint and the effect of `--lint` and `--all`.
## Notes
### `last-audited` file conents
```bash
PROJECT_LAST_AUDITED=
PROJECT_LAST_AUDITED_DATE=
PROJECT_LAST_AUDIT_SECURITY_STATUS=
PROJECT_LAST_AUDIT_LINT_STATUS=
```
You can get the current repo hash with `git rev-parse HEAD`.
Use `date +%Y-%m-%d` to generate date.
### Report capture
We want to capture the reports while still displaying them to the user. Ideally, this would preserve any coloring in the reports, and the use `tee` may be the best solution. Another possibility is to write the reports as a file, and then `cat` the file (though I suspect this will lose the coloring info).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the `liq projects audit` entry point, `src/actions/projects/lib.sh`, and the projects `help.sh`; review issue #103 for `projectHasFunctionalChange` and the helper functions it requires. Add the requested unit test for `projectsLintRequired`, then verify audit reports, clean-repository metadata, dirty-repository warnings, lint skipping, and help text for `--lint` and `--all`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100