-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 255ff9f
Showing
57 changed files
with
3,321 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning | ||
name: CodeQL | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
permissions: | ||
actions: read # for github/codeql-action/init to get workflow details | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/autobuild to send a status report | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ['go'] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Dependency Review' | ||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
name: Run dependency review | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v4 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
- name: Unit tests | ||
run: | | ||
mv .testdata src/builtins | ||
go test -coverprofile=coverage.out ./src && go tool cover -func=coverage.out | ||
- name: Check that we didn't lose anything | ||
run: diff <(cat testlogs/* | go run ./main.go | sed 's/\x1b\[[0-9;]*m//g') <(cat testlogs/*) | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.3.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Spell Check" | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
typos: | ||
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: crate-ci/typos@v1.20.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist/ | ||
coverage.out | ||
.logalize.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 1 | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of `uname`. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
formats: | ||
test: | ||
pattern: bad: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" | ||
formats: | ||
nginx-combined: | ||
# $remote_addr | ||
- pattern: (\d{1,3}(\.\d{1,3}){3} ) | ||
fg: "#f5ce42" | ||
# - | ||
- pattern: (- ) | ||
fg: "#807e7a" | ||
# $remote_user | ||
- pattern: ([^ ]+ ) | ||
fg: "#764a9e" | ||
# [$time_local] | ||
- pattern: (\[.+\] ) | ||
fg: "#148dd9" | ||
# "$request" | ||
- pattern: ("[^"]+" ) | ||
fg: "#9ddb56" | ||
# $status | ||
- pattern: (\d\d\d ) | ||
fg: "#ffffff" | ||
alternatives: | ||
- pattern: (2\d\d ) | ||
fg: "#00ff00" | ||
style: bold | ||
- pattern: (3\d\d ) | ||
fg: "#00ffff" | ||
style: bold | ||
- pattern: (4\d\d ) | ||
fg: "#ff0000" | ||
style: bold | ||
- pattern: (5\d\d ) | ||
fg: "#ff00ff" | ||
style: bold | ||
# $body_bytes_sent | ||
- pattern: ([\d]+ ) | ||
fg: "#7d7d7d" | ||
# "$http_referer" | ||
- pattern: ("[^"]+" ) | ||
fg: "#3ae1f0" | ||
# "$http_user_agent" | ||
- pattern: ("[^"]+") | ||
fg: "#aa7dd1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
words: | ||
bad: bad: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
words: | ||
good: | ||
fg: "#52fa8a" | ||
style: bold | ||
list: | ||
- "active" | ||
- "attempt" | ||
- "clean" | ||
- "complete" | ||
- "configure" | ||
- "connect" | ||
- "done" | ||
- "enable" | ||
- "finish" | ||
- "found" | ||
- "listen" | ||
- "load" | ||
- "ok" | ||
- "online" | ||
- "open" | ||
- "ready" | ||
- "register" | ||
- "start" | ||
- "succeed" | ||
- "success" | ||
- "successful" | ||
- "successfully" | ||
- "true" | ||
- "valid" | ||
bad: | ||
fg: "#f06c62" | ||
style: bold | ||
list: | ||
- "alarm" | ||
- "block" | ||
- "close" | ||
- "critical" | ||
- "deny" | ||
- "disable" | ||
- "down" | ||
- "empty" | ||
- "end" | ||
- "error" | ||
- "exit" | ||
- "fail" | ||
- "false" | ||
- "fatal" | ||
- "invalid" | ||
- "offline" | ||
- "shut" | ||
- "stop" | ||
- "terminate" | ||
- "unable" | ||
- "unreach" | ||
warning: | ||
fg: "#fcba03" | ||
style: bold | ||
list: | ||
- "detected" | ||
- "ignore" | ||
- "miss" | ||
- "readonly" | ||
- "reload" | ||
- "restart" | ||
- "skip" | ||
- "warn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Rufus Deponian | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" | ||
formats: | ||
nginx-combined: | ||
# $remote_addr | ||
- pattern: (\d{1,3}(\.\d{1,3}){3} ) | ||
fg: "#f5ce42" | ||
# - | ||
- pattern: (- ) | ||
fg: "#807e7a" | ||
# $remote_user | ||
- pattern: ([^ ]+ ) | ||
fg: "#764a9e" | ||
# [$time_local] | ||
- pattern: (\[.+\] ) | ||
fg: "#148dd9" | ||
# "$request" | ||
- pattern: ("[^"]+" ) | ||
fg: "#9ddb56" | ||
# $status | ||
- pattern: (\d\d\d ) | ||
fg: "#ffffff" | ||
alternatives: | ||
- pattern: (2\d\d ) | ||
fg: "#00ff00" | ||
style: bold | ||
- pattern: (3\d\d ) | ||
fg: "#00ffff" | ||
style: bold | ||
- pattern: (4\d\d ) | ||
fg: "#ff0000" | ||
style: bold | ||
- pattern: (5\d\d ) | ||
fg: "#ff00ff" | ||
style: bold | ||
# $body_bytes_sent | ||
- pattern: ([\d]+ ) | ||
fg: "#7d7d7d" | ||
# "$http_referer" | ||
- pattern: ("[^"]+" ) | ||
fg: "#3ae1f0" | ||
# "$http_user_agent" | ||
- pattern: ("[^"]+") | ||
fg: "#aa7dd1" |
Oops, something went wrong.