Skip to content
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

Housekeeping #16

Merged
merged 4 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: 2023-2024 Steffen Vogel <post@steffenvogel.de>
# SPDX-License-Identifier: Apache-2.0

# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
---
name: Compliance Checks

on:
push:
branches:
- main
pull_request:

jobs:
reuse:
uses: cunicu/.github/.github/workflows/reuse.yaml@v0.2.0
14 changes: 14 additions & 0 deletions .github/workflows/mirror.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: 2023-2024 Steffen Vogel <post@steffenvogel.de>
# SPDX-License-Identifier: Apache-2.0

# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
---
name: Mirror to Codeberg

on: [push, delete]

jobs:
mirror:
uses: cunicu/.github/.github/workflows/mirror.yaml@v0.2.0
secrets:
CODEBERG_SSH_KEY: ${{ secrets.CODEBERG_SSH_KEY }}
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2023-2024 Steffen Vogel <post@steffenvogel.de>
# SPDX-License-Identifier: Apache-2.0

# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
---
name: Release

on:
push:
branches:
- main

jobs:
semver-tag:
uses: cunicu/.github/.github/workflows/release.yaml@v0.2.0
secrets:
PAT: ${{ secrets.PAT }}
permissions:
contents: write
22 changes: 0 additions & 22 deletions .github/workflows/reuse.yaml

This file was deleted.

5 changes: 1 addition & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ linters:
- gocognit # Computes and checks the cognitive complexity of functions
- goconst # Finds repeated strings that could be replaced by a constant
- gocritic # The most opinionated Go source code linter
- goerr113 # Golang linter to check the errors handling expressions
- err113 # Golang linter to check the errors handling expressions
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
- gofumpt # Gofumpt checks whether code was gofumpt-ed.
- goheader # Checks is file header matches to pattern
Expand Down Expand Up @@ -93,19 +93,16 @@ linters:
- containedctx # containedctx is a linter that detects struct contained context.Context field
- cyclop # checks function and package cyclomatic complexity
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- exhaustivestruct # Checks if all struct's fields are initialized
- forbidigo # Forbids identifiers
- funlen # Tool for detection of long functions
- gocyclo # Computes and checks the cyclomatic complexity of functions
- godot # Check if comments end in a period
- godox # Tool for detection of FIXME, TODO and other comment keywords
- gomnd # An analyzer to detect magic numbers.
- ifshort # Checks that your code uses short syntax for if-statements whenever possible
- ireturn # Accept Interfaces, Return Concrete Types
- lll # Reports long lines
- maintidx # maintidx measures the maintainability index of each function.
- makezero # Finds slice declarations with non-zero initial length
- maligned # Tool to detect Go structs that would take less memory if their fields were sorted
- nestif # Reports deeply nested if statements
- nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
- nolintlint # Reports ill-formed or insufficient nolint directives
Expand Down
121 changes: 0 additions & 121 deletions LICENSES/CC0-1.0.txt

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ This `skeleton` repo a template for new Go packages belonging to the cunicu orga

## Usage

## Authors
## Contact

- Steffen Vogel ([@stv0g](https://github.com/stv0g))
Please have a look at the contact page: [cunicu.li/docs/contact](https://cunicu.li/docs/contact).

## License

Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 15 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,31 @@
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem
(
system: let
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
pkg-config
clang
go_1_22
go
golangci-lint
reuse
];

hardeningDisable = [ "fortify" ];
};

formatter = nixpkgs.alejandra;
formatter = pkgs.nixfmt-rfc-style;
}
);
}
Loading