Commit Graph

13 Commits

Author SHA1 Message Date
Case Wylie
39e968dceb
⚠️ errors in ErrXXX format (#4040)
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
2024-04-17 22:49:12 -07:00
Pedro Kaj Kjellerup Nacht
6d35c865e6
🐛 Pinned-Dependencies continues on error (#3515)
* Continue on error detecting OS

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add tests for error detecting OS

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add ElementError to identify elements that errored

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add Incomplete field to PinningDependenciesData

Will store all errors handled during analysis, which may lead to incomplete results.

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Register job steps that errored out

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add tests that incomplete steps are caught

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add warnings to details about incomplete steps

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add tests that incomplete steps generate warnings

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Register shell files skipped due to parser errors

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add tests showing when parser errors affect analysis

Dockerfile pinning is not affected.
Everything in a 'broken' Dockerfile RUN block is ignored
Everything in a 'broken' shell script is ignored
testdata/script-invalid.sh modified to demonstrate the above

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Incomplete results logged as Info, not Warn

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Remove `Type` from logging of incomplete results

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Update tests after rebase

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add Unwrap for ElementError, improve its docs

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Add ElementError case to evaluation unit test

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Move ElementError to checker/raw_result

checker/raw_result defines types used to describe analysis results.

ElementError is meant to describe potential flaws in the analysis
and is therefore a sort of analysis result itself.

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Use finding.Location for ElementError.Element

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Use an ElementError for script parser errors

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Replace .Incomplete []error with .ProcessingErrors []ElementError

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

* Adopt from reviewer comments

- Replace ElementError's `Element *finding.Location`
  with `Location finding.Location`
- Rename ErrorJobOSParsing to ErrJobOSParsing to satisfy linter
- Fix unit test

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>

---------

Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-11-08 13:03:15 -08:00
Spencer Schrock
5eca374b1e
🌱 enable style linter errname (#3587)
* enable errname linter

Signed-off-by: Spencer Schrock <sschrock@google.com>

* convert publish err to custom error type.

Signed-off-by: Spencer Schrock <sschrock@google.com>

* remove unused exported error.

Signed-off-by: Spencer Schrock <sschrock@google.com>

* convert unsupported exporter type to custom error type.

Signed-off-by: Spencer Schrock <sschrock@google.com>

* exempt public errors from linter.

Signed-off-by: Spencer Schrock <sschrock@google.com>

* exempt cron config errors from linter.

Signed-off-by: Spencer Schrock <sschrock@google.com>

---------

Signed-off-by: Spencer Schrock <sschrock@google.com>
2023-10-23 23:10:04 +00:00
Arnaud J Le Hors
2169bc44c7
Use new project name in Copyright notices (#2505)
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2022-12-01 15:08:48 -08:00
Spencer Schrock
d6bef98844
Wrap check errors with distinct error for scorecard-action to ignore. (#2250)
Signed-off-by: Spencer Schrock <sschrock@google.com>

Signed-off-by: Spencer Schrock <sschrock@google.com>
2022-09-12 16:38:56 +00:00
Azeem Shaikh
1c95237e4a
Only run allowed checks in different modes (#1579)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2022-02-07 16:49:49 -08:00
Chris McGehee
90332a9cb9
🌱 Add counting of shell parsing errors (#1026)
* Add counting of shell parsing errors

* Use existing CheckErrors metric instead

Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2021-09-22 14:46:29 +00:00
Azeem Shaikh
bc37c74b28
Remove Owner/Repo strings from CheckRequest (#997)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-09-10 10:13:14 -07:00
Azeem Shaikh
e730e911e6
sce.Create -> sce.WithMessage for wrapcheck (#995)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-09-10 15:50:33 +00:00
laurentsimon
6718939a08
Cleanup errors and log (#782)
* cleanup

* text

* add errors

* fixes

* more

* fixes

* linnter

* comments

* name
2021-08-02 22:38:42 +00:00
Azeem Shaikh
83e9f52501
Enable revive linters which are used in google3 (#793)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-07-31 22:31:34 +00:00
laurentsimon
a004ffb107
cleanup Frozen-Deps MakeResultAnd (#742)
* draft

* fixes

* commi 1

* delete file

* clean

* clean 2

* linter

* fix score

* handle err

* in-proress score

* fixes
2021-07-26 22:02:46 +00:00
laurentsimon
ab4bb60c9c
[migration to score] 1: create errors and new functions (#712)
* details-1

* comment

* doc

* nits

* typo

* commments

* nit

* linter
2021-07-20 11:36:35 -07:00