Commit Graph

23 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
Spencer Schrock
0b9dfb656f
⚠️ Replace v4 module references with v5 (#4027)
Signed-off-by: Spencer Schrock <sschrock@google.com>
2024-04-12 14:51:50 -07:00
Spencer Schrock
aeaee6099e
📖 Review and update CONTRIBUTING.md (#4002)
* feature dco requirement more prominently

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

* recommend merge commits to sync PR

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

* fix make target table

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

* remove references to old Go environment variables

GO111MODULE is no longer used as of Go 1.17.
GOPATH is still used for other purposes, but not in 'development mode'.
https://go.dev/wiki/GOPATH

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

* misc minor clarifications

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

* remove reference to errors from CONTRIBUTORS.md

I don't think this is one of the top things we should be displaying to someone

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

* mention make in environment

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

* no scopes needed for PATs

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

* highlight other scorecard options

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

* allow shell codeblocks to be pasted into a shell

the comment style was wrong and the $ was interpretted as a command.

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

---------

Signed-off-by: Spencer Schrock <sschrock@google.com>
2024-04-04 12:52:11 -07:00
Spencer Schrock
d882fc73e1
🌱 re-enable paralleltest linter (#3705)
Signed-off-by: Spencer Schrock <sschrock@google.com>
2023-12-04 02:25:03 +00:00
Spencer Schrock
1625b0c578
🌱 Disable more style linters for test files (#3707)
* disable lll linter for test files
* disable goerr113 linter for tests
* disable wrapcheck linter for tests
* fix easy linter issues in tests

---------

Signed-off-by: Spencer Schrock <sschrock@google.com>
2023-12-04 02:14:01 +00: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
5f3a0e2092
🌱 Enable golangci-lint test presets (#3594)
* enable test preset

Leaves some opinionated linters disabled with reasons.

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

* fix tparallel issues.

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

---------

Signed-off-by: Spencer Schrock <sschrock@google.com>
2023-10-27 15:05:40 -07: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
Naveen
361c57f489
🌱 Unit tests errors/internal.go (#2977)
- Add tests for the `CreateInternal` and `WithMessage`/`GetName` functions
- Add license headers to `internal_test.go` and `public_test.go` files

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2023-05-09 19:46:17 -05: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
6368c25f54
More linter issues (#794)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-08-01 03:42:14 +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
Naveen
4d7fb5d748
🌱 Fix the go.mod with v2 upgrade (#716)
The go.mod and the related files weren't t updated with the v2 upgrade.

https://github.com/ossf/scorecard/issues/711

This fix will address the issue.
2021-07-26 13:01:25 -05:00
laurentsimon
5e634c8945
[migration to score] 2: dependabot and binary artifact checks (#718)
* details-1

* nits

* typo

* commments

* dependabot and binary artifacts checks

* typo

* linter

* missing errors.go

* linter

* merge fix

* dates
2021-07-21 09:02:43 -07: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
Azeem Shaikh
9266f97ee9
Add monitoring for Scorecard errors (#597)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-06-21 15:38:50 -07:00