-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CEL code migration #1
base: main
Are you sure you want to change the base?
Changes from all commits
e2dc904
ec1e761
1f99801
3dd3a8e
4926bcf
38c50ee
63d7297
e4c7864
0bf660f
251b861
94e6629
0e734a3
9cea08a
9354da1
a0b4b8a
ec64493
f6c7007
e1cee25
a178488
468ae7e
ed4e291
b737391
53d85a6
7e909f3
99cce3f
c3e244e
3cbcf30
a75f76f
6f9992d
b59114f
c69c1b4
b80d58c
7ea8e67
179c3ff
3a845d4
9413086
64ee9ac
b5c6709
9c3f5ea
743b98d
0d002ef
0aede24
2e702c8
9f98396
f58b6b9
45adf7f
d46a116
5fe59e0
ebb2e4c
0f825bc
aa903c4
69c1df5
38c2905
d0ebfff
8515f90
8678198
79168cf
fbad942
6b33aee
96d9ba7
470d9c7
ef4967b
0199c1c
b85d881
18dfcff
7951657
ef72ea1
9a7ceb9
51da1d9
ce3ec4e
a877a05
c9ae5b7
e9e2905
7b5bc06
0aeb208
6c5d2d5
82b2643
47bca29
0a74a85
5957abb
5bf527e
0188f53
fd24a03
df178f3
92d2d1c
ee38113
45e673a
805ee01
bfb9d13
39e79b5
d6ad6f6
9b4a277
293729b
ec81cbb
e853e6f
0252950
dfd5e8f
643e87a
c40f0c4
c06fcbe
dc1c181
564601b
f7dbc56
f96e57a
f6321ef
45ac6ce
0be477b
58ab910
bdc76c5
901cede
f5b6872
1624945
fd12ca8
40c83d4
1a6e267
a10ac23
6f864ee
75bbba8
d23bcd6
4467d76
e52c0e3
ba841d8
de7d2cc
7e56aa0
be22d06
b6dc6cd
2e97669
db671a8
e83311b
2014cb5
2e9c213
942313c
b4d3edc
6837a4c
9406819
cfd259e
35806d0
9482583
d3e86ad
70cb7aa
54b07c7
3185249
5ace89c
4eb0db0
82f485f
f1cd6cd
5b94339
b87a919
6fa7b89
8ed0d7e
7ef9ca8
f1cb8d9
b6e9112
d8bb1ca
39b7c84
5a23931
60f37fd
1aff611
f34ea27
71297f6
ebb4670
357aca2
2b851bd
12d427e
7190fed
4ee85e8
549800f
be06f90
3711fb1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# SPDX-FileCopyrightText: Copyright 2025 The Protobom Authors | ||
--- | ||
license: Apache-2.0 | ||
name: github.com/protobom/cel | ||
creator: | ||
person: The Protobom Authors | ||
tool: bom | ||
|
||
artifacts: | ||
- type: directory | ||
source: ../ | ||
license: Apache-2.0 | ||
gomodules: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# SPDX-FileCopyrightText: Copyright 2025 The Protobom Authors | ||
|
||
version: 2 | ||
|
||
updates: | ||
|
||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# SPDX-FileCopyrightText: Copyright 2025 The Protobom Authors | ||
|
||
name: build-and-test | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | ||
with: | ||
go-version-file: go.mod | ||
cache: false | ||
|
||
- name: Test | ||
run: | | ||
go get -d ./... | ||
go test -v ./... | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# SPDX-FileCopyrightText: Copyright 2025 The Protobom Authors | ||
|
||
name: golangci-lint | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | ||
with: | ||
go-version-file: go.mod | ||
cache: false | ||
|
||
- name: Run golangci-lint | ||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | ||
with: | ||
version: v1.61 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright 2023 The OpenVEX Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # needed to write releases | ||
id-token: write # needed for keyless signing | ||
packages: write # needed for pushing the images to ghcr.io | ||
|
||
env: | ||
GO111MODULE: on | ||
COSIGN_EXPERIMENTAL: "true" | ||
|
||
steps: | ||
- name: Check out code onto GOPATH | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | ||
with: | ||
go-version-file: go.mod | ||
cache: false | ||
|
||
- name: Install cosign | ||
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0 | ||
|
||
- name: Install bom | ||
uses: kubernetes-sigs/release-actions/setup-bom@a69972745f85aab4ba5d6c681e2a0e7f73eaff2b # v0.3.0 | ||
|
||
- name: Get TAG | ||
id: get_tag | ||
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Generate SBOM | ||
shell: bash | ||
run: | | ||
bom generate --format=json -o /tmp/protobom-cel-$TAG.spdx.json . | ||
|
||
- name: Publish Release | ||
uses: kubernetes-sigs/release-actions/publish-release@a69972745f85aab4ba5d6c681e2a0e7f73eaff2b # v0.3.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
assets: "/tmp/protobom-cel-$TAG.spdx.json" | ||
sbom: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
dist | ||
go.work.sum | ||
|
||
# env file | ||
.env | ||
tmp/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
--- | ||
run: | ||
concurrency: 6 | ||
timeout: 5m | ||
issues: | ||
exclude-dirs: | ||
- tmp/* | ||
exclude-rules: | ||
# counterfeiter fakes are usually named 'fake_<something>.go' | ||
- path: fake_.*\.go | ||
linters: | ||
- gocritic | ||
- golint | ||
- dupl | ||
|
||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50. | ||
max-issues-per-linter: 0 | ||
|
||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3. | ||
max-same-issues: 0 | ||
linters: | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
# - depguard | ||
- dogsled | ||
- dupl | ||
- durationcheck | ||
- errcheck | ||
# - goconst Disabled temporarily as we need to const away all the relationships | ||
- gocritic | ||
# - gocyclo Disables until some functions are optimized | ||
- godox | ||
- gofmt | ||
- gofumpt | ||
- goheader | ||
- goimports | ||
- gomoddirectives | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- importas | ||
- ineffassign | ||
- makezero | ||
- misspell | ||
- nakedret | ||
- nolintlint | ||
- prealloc | ||
- predeclared | ||
- promlinter | ||
- revive # Disabled for now as we have lots of uppercase consts | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
# - cyclop | ||
# - errorlint | ||
# - exhaustive | ||
# - exhaustivestruct | ||
# - exportloopref | ||
# - forbidigo | ||
# - forcetypeassert | ||
# - funlen | ||
- gci | ||
# - gochecknoglobals | ||
# - gochecknoinits | ||
# - gocognit | ||
# - godot | ||
# - goerr113 | ||
# - gomnd | ||
# - ifshort | ||
# - lll | ||
# - nestif | ||
# - nilerr | ||
# - nlreturn | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you want to enable this, or no? Up to you, just following up from my other comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nlreturn? I just tried it and it highlighted a ton of issues, I'm not sure I want to deal with those now :S |
||
# - noctx | ||
# - paralleltest | ||
# - scopelint | ||
# - tagliatelle | ||
# - testpackage | ||
# - thelper | ||
# - tparallel | ||
# - wastedassign | ||
# - wrapcheck | ||
# - wsl | ||
linters-settings: | ||
depguard: | ||
list-type: blacklist | ||
include-go-root: true | ||
include-go-std-lib: true | ||
gci: | ||
no-inline-comments: false | ||
no-prefix-comments: true | ||
sections: | ||
- standard | ||
- default | ||
- prefix(github.com/protobom/cel) | ||
|
||
section-separators: | ||
- newLine | ||
godox: | ||
keywords: | ||
- BUG | ||
- FIXME | ||
- HACK | ||
errcheck: | ||
check-type-assertions: true | ||
check-blank: true | ||
gocritic: | ||
enabled-checks: | ||
# Diagnostic | ||
- commentedOutCode | ||
- nilValReturn | ||
- sloppyReassign | ||
- weakCond | ||
- octalLiteral | ||
|
||
# Performance | ||
- appendCombine | ||
- equalFold | ||
- hugeParam | ||
- indexAlloc | ||
- rangeExprCopy | ||
- rangeValCopy | ||
|
||
# Style | ||
- boolExprSimplify | ||
- commentedOutImport | ||
- docStub | ||
- emptyFallthrough | ||
- emptyStringTest | ||
- hexLiteral | ||
- methodExprCall | ||
- stringXbytes | ||
- typeAssertChain | ||
- unlabelStmt | ||
- yodaStyleExpr | ||
# - ifElseChain | ||
|
||
# Opinionated | ||
- builtinShadow | ||
- importShadow | ||
- initClause | ||
- nestingReduce | ||
- paramTypeCombine | ||
- ptrToRefParam | ||
- typeUnparen | ||
- unnamedResult | ||
- unnecessaryBlock | ||
nolintlint: | ||
# Enable to ensure that nolint directives are all used. Default is true. | ||
allow-unused: false | ||
# Disable to ensure that nolint directives don't have a leading space. Default is true. | ||
# TODO(lint): Enforce machine-readable `nolint` directives | ||
allow-leading-space: true | ||
# Exclude following linters from requiring an explanation. Default is []. | ||
allow-no-explanation: [] | ||
# Enable to require an explanation of nonzero length after each nolint directive. Default is false. | ||
# TODO(lint): Enforce explanations for `nolint` directives | ||
require-explanation: false | ||
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false. | ||
require-specific: true | ||
revive: | ||
enable-all-rules: true | ||
rules: | ||
- name: add-constant | ||
arguments: | ||
- allowInts: "0,1,2,3,4,5,6,7,8,9" | ||
- name: line-length-limit | ||
disabled: true | ||
- name: function-length | ||
disabled: true | ||
- name: cognitive-complexity | ||
disabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're interested, the Makefile over in protobom/storage has a target to run all the tests and print out a coverage report. Up to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll start improving all the machinery once we check-in the code. This are stripped version of the files originally written to release the bomshell binary.