diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 082f298..a3080a9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,3 +1,8 @@ +# Copyright (c) 2024 Six After, Inc +# +# This source code is licensed under the Apache 2.0 License found in the +# LICENSE file in the root directory of this source tree. + # Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions name: ci @@ -53,7 +58,7 @@ jobs: # Ref: https://github.com/golangci/golangci-lint-action - name: Lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: args: --timeout=30m --config=.golangci.yaml --issues-exit-code=0 @@ -70,7 +75,7 @@ jobs: make analyze # Ref: https://github.com/actions/cache - - name: Cache SonarCloud Packages + - name: Cache SonarQube Packages uses: actions/cache@v4 with: path: ~/.sonar/cache @@ -78,8 +83,8 @@ jobs: restore-keys: ${{ runner.os }}-sonar- # Ref: https://github.com/SonarSource/sonarqube-scan-action - - name: Scan with SonarCloud - uses: sonarsource/sonarqube-scan-action@v4 + - name: Scan with SonarQube + uses: sonarsource/sonarqube-scan-action@v5 with: projectBaseDir: ./ env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 080ab7c..ceeb451 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,3 +1,8 @@ +# Copyright (c) 2024 Six After, Inc +# +# This source code is licensed under the Apache 2.0 License found in the +# LICENSE file in the root directory of this source tree. + # Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions name: release diff --git a/.golangci.yaml b/.golangci.yaml index 944fbfa..ea125eb 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,3 +1,8 @@ +# Ref: https://golangci-lint.run/usage/configuration/ + +# See the dedicated "version" documentation section. +version: "2" + # Options for analysis running. run: # The default concurrency value is the number of available CPU. @@ -15,30 +20,6 @@ run: # Default: []. build-tags: [] - # Exclude certain directories from linting - exclude-dirs: - - "vendor" - - "third_party" - - "generated" - - # Which dirs to skip: issues from them won't be reported. - # Can use regexp here: `generated.*`, regexp is applied on full path, - # including the path prefix if one is set. - # Default value is empty list, - # but default dirs are skipped independently of this option's value (see skip-dirs-use-default). - # "/" will be replaced by current OS file path separator to properly work on Windows. - skip-dirs: [] - # Enables skipping of directories: - # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ - # Default: true - skip-dirs-use-default: true - # Which files to skip: they will be analyzed, but issues from them won't be reported. - # Default value is empty list, - # but there is no need to include all autogenerated files, - # we confidently recognize autogenerated files. - # If it's not please let us know. - # "/" will be replaced by current OS file path separator to properly work on Windows. - skip-files: [] # If set we pass it to "go list -mod={option}". From "go help modules": # If invoked with -mod=readonly, the go command is disallowed from the implicit # automatic updating of go.mod described above. Instead, it fails when any changes @@ -56,18 +37,34 @@ run: allow-parallel-runners: false output: - sort-results: true + # Order to use when sorting results. + # Possible values: `file`, `linter`, and `severity`. + # + # If the severity values are inside the following list, they are ordered in this order: + # 1. error + # 2. warning + # 3. high + # 4. medium + # 5. low + # Either they are sorted alphabetically. + # + # Default: ["linter", "file"] + sort-order: + - linter + - severity + - file # filepath, line, and column. -linters-settings: - cyclop: - package-average: 20.0 +linters: + settings: + cyclop: + package-average: 20.0 - funlen: - lines: 500 - statements: 350 + funlen: + lines: 500 + statements: 350 - govet: - enable-all: true + govet: + enable-all: true - makezero: - always: true \ No newline at end of file + makezero: + always: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aeb36f..0f9574b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,21 @@ Date format: `YYYY-MM-DD` ### Fixed ### Security +--- +## [0.4.0] - 2025-04-16 + +### Added +- **risk:** Added copyright notice to GitHub Actions workflows. +- **debt:** Organized badges in `README.md`. + +### Changed +- **debt**: Upgraded all dependencies to the latest supported versions. + +### Deprecated +### Removed +### Fixed +### Security + --- ## [0.3.0] - 2025-02-13 @@ -64,7 +79,8 @@ Date format: `YYYY-MM-DD` ### Fixed ### Security -[Unreleased]: https://github.com/sixafter/graph/compare/v0.3.0...HEAD +[Unreleased]: https://github.com/sixafter/graph/compare/v0.4.0...HEAD +[0.4.0]: https://github.com/sixafter/graph/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/sixafter/graph/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/sixafter/graph/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/sixafter/graph/compare/c13c255fffdeb319e99e86f5909e84edab8277b3...v0.1.0 diff --git a/README.md b/README.md index a20f126..14cac9c 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,31 @@ # graph -[![CI](https://github.com/sixafter/graph/workflows/ci/badge.svg)](https://github.com/sixafter/graph/actions) -[![Go](https://img.shields.io/github/go-mod/go-version/sixafter/graph)](https://img.shields.io/github/go-mod/go-version/sixafter/graph) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=six-after_graph&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=six-after_graph) -[![GitHub issues](https://img.shields.io/github/issues/sixafter/graph)](https://github.com/sixafter/graph/issues) -[![Go Reference](https://pkg.go.dev/badge/github.com/sixafter/graph.svg)](https://pkg.go.dev/github.com/sixafter/graph) +A Go library for creating and manipulating graph data structures. + [![Go Report Card](https://goreportcard.com/badge/github.com/sixafter/graph)](https://goreportcard.com/report/github.com/sixafter/graph) [![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](LICENSE) +[![Go](https://img.shields.io/github/go-mod/go-version/sixafter/graph)](https://img.shields.io/github/go-mod/go-version/sixafter/graph) +[![Go Reference](https://pkg.go.dev/badge/github.com/sixafter/graph.svg)](https://pkg.go.dev/github.com/sixafter/graph) + +--- + +## Status + +### 🛠️ Build & Test + +[![CI](https://github.com/sixafter/graph/workflows/ci/badge.svg)](https://github.com/sixafter/graph/actions) +[![GitHub issues](https://img.shields.io/github/issues/sixafter/graph)](https://github.com/sixafter/graph/issues) + +### 🚦Quality + +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=six-after_graph&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=six-after_graph) ![CodeQL](https://github.com/sixafter/graph/actions/workflows/codeql-analysis.yaml/badge.svg) -A Go library for creating and manipulating graph data structures. +### 🚀 Package and Deploy + +[![Release](https://github.com/sixafter/graph/workflows/release/badge.svg)](https://github.com/sixafter/graph/actions) + +--- ## Features diff --git a/go.mod b/go.mod index 1bbe54e..58d96af 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.24 require ( github.com/stretchr/testify v1.10.0 - golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac + golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 ) require ( diff --git a/go.sum b/go.sum index 717ba6e..470275a 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo7yrN4mVcnkHDYz5vvs= -golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/vendor/golang.org/x/exp/constraints/constraints.go b/vendor/golang.org/x/exp/constraints/constraints.go index a9392af..9d260ba 100644 --- a/vendor/golang.org/x/exp/constraints/constraints.go +++ b/vendor/golang.org/x/exp/constraints/constraints.go @@ -6,6 +6,8 @@ // with type parameters. package constraints +import "cmp" + // Signed is a constraint that permits any signed integer type. // If future releases of Go add new predeclared signed integer types, // this constraint will be modified to include them. @@ -47,6 +49,6 @@ type Complex interface { // this constraint will be modified to include them. // // This type is redundant since Go 1.21 introduced [cmp.Ordered]. -type Ordered interface { - Integer | Float | ~string -} +// +//go:fix inline +type Ordered = cmp.Ordered diff --git a/vendor/modules.txt b/vendor/modules.txt index 821ba20..ebdf36d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -10,8 +10,8 @@ github.com/pmezard/go-difflib/difflib ## explicit; go 1.17 github.com/stretchr/testify/assert github.com/stretchr/testify/assert/yaml -# golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac -## explicit; go 1.22.0 +# golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 +## explicit; go 1.23.0 golang.org/x/exp/constraints # gopkg.in/yaml.v3 v3.0.1 ## explicit