Skip to content

Commit

Permalink
chore: hqsubfind3r -> xsubfind3r
Browse files Browse the repository at this point in the history
  • Loading branch information
enenumxela committed May 25, 2023
1 parent 11e46cc commit 976bfd7
Show file tree
Hide file tree
Showing 62 changed files with 1,767 additions and 1,302 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
# Maintain dependencies for GitHub Actions
-
package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for go modules
-
package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"
45 changes: 45 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 🔨 Build Test

on:
push:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
pull_request:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
workflow_dispatch:

jobs:
build:
name: Build Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-12]
runs-on: ${{ matrix.os }}
steps:
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
-
name: Checkout the code
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Go modules hygine
run: |
go clean -modcache
go mod tidy
working-directory: .
-
name: Go build
run: go build -v .
working-directory: ./cmd/xsubfind3r
27 changes: 0 additions & 27 deletions .github/workflows/build.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 💅 Lint Test

on:
push:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
pull_request:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
workflow_dispatch:

permissions:
contents: read

jobs:
lint:
name: Lint Test
runs-on: ubuntu-latest
steps:
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
-
name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
39 changes: 17 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
name: release 🎉
name: 🎉 release

on:
create:
branches:
- main
tags:
- v*.*.*
workflow_dispatch:

jobs:
release:
name: release
name: Release
runs-on: ubuntu-latest
steps:
-
name: Check out code
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
-
name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
go-version: '>=1.17.0'
-
name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
-
name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v3
args: "release --clean"
version: latest
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
args: "release --rm-dist"
version: latest
distribution: goreleaser
SLACK_WEBHOOK: "${{ secrets.SLACK_WEBHOOK }}"
DISCORD_WEBHOOK_ID: "${{ secrets.DISCORD_WEBHOOK_ID }}"
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Executable

cmd/hqsubfind3r/hqsubfind3r
cmd/xsubfind3r/xsubfind3r

# Notes

Expand Down
61 changes: 61 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
run:
issues-exit-code: 1

linters:
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gocyclo
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
- prealloc
- predeclared
- revive
- staticcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- whitespace
- wsl

linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enabled-tags:
- style
- diagnostic
- performance
- experimental
- opinionated
disabled-checks:
- captLocal
- octalLiteral
govet:
check-shadowing: true
disabled-checks:
- fieldalignment
nolintlint:
require-explanation: true
require-specific: true
39 changes: 36 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ before:

builds:
-
binary: hqsubfind3r
main: cmd/hqsubfind3r/main.go
id: xsubfind3r-cli
main: cmd/xsubfind3r/main.go
binary: xsubfind3r

env:
- CGO_ENABLED=0

goos:
- linux
- windows
Expand All @@ -15,14 +20,42 @@ builds:
- 386
- arm
- arm64
ignore:
-
goos: darwin
goarch: 386
-
goos: windows
goarch: arm
-
goos: windows
goarch: arm64

flags:
- -trimpath

archives:
-
id: tgz
builds: [xsubfind3r-cli]
format: tar.gz
replacements:
darwin: macOS
format_overrides:
-
goos: windows
format: zip
format: zip

checksum:
algorithm: sha256

announce:
slack:
enabled: true
channel: '#release'
username: GoReleaser
message_template: 'New Release: {{ .ProjectName }} {{.Tag}} is published! Check it out at {{ .ReleaseURL }}'

discord:
enabled: true
message_template: '**New Release: {{ .ProjectName }} {{.Tag}}** is published! Check it out at {{ .ReleaseURL }}'
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Contributing

Contributions are welcomed!

Please review the following guidelines before contributing. Also, feel free to propose changes to these guidelines by updating this file and submitting a pull request.

* [I have a question...](#have-a-question)
* [I found a bug...](#found-a-bug)
* [I have a feature request...](#have-a-feature-request)
* [I have a contribution to share...](#ready-to-contribute)

## Have a Question?

Please don't open a GitHub issue for questions about how to use `xsubfind3r`, as the goal is to use issues for managing bugs and feature requests. Issues that are related to general support will be closed.

## Found a Bug?

If you've identified a bug in `xsubfind3r`, please [submit an issue](#create-an-issue) to our GitHub repo: [hueristiq/xsubfind3r](https://github.com/hueristiq/xsubfind3r/issues/new). Please also feel free to submit a [Pull Request](#pull-requests) with a fix for the bug!

## Have a Feature Request?

All feature requests should start with [submitting an issue](#create-an-issue) documenting the user story and acceptance criteria. Again, feel free to submit a [Pull Request](#pull-requests) with a proposed implementation of the feature.

## Ready to Contribute

### Create an issue

Before submitting a new issue, please search the issues to make sure there isn't a similar issue doesn't already exist.

Assuming no existing issues exist, please ensure you include required information when submitting the issue to ensure we can quickly reproduce your issue.

We may have additional questions and will communicate through the GitHub issue, so please respond back to our questions to help reproduce and resolve the issue as quickly as possible.

New issues can be created with in our [GitHub repo](https://github.com/hueristiq/xsubfind3r/issues/new).

### Pull Requests

Pull requests should target the `dev` branch. Please also reference the issue from the description of the pull request using [special keyword syntax](https://help.github.com/articles/closing-issues-via-commit-messages/) to auto close the issue when the PR is merged. For example, include the phrase `fixes #14` in the PR description to have issue #14 auto close.

### Styleguide

When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Here are a few points to keep in mind:

* Please run `go fmt ./...` before committing to ensure code aligns with go standards.
* We use [`golangci-lint`](https://golangci-lint.run/) for linting Go code, run `golangci-lint run --fix` before submitting PR. Editors such as Visual Studio Code or JetBrains IntelliJ; with Go support plugin will offer `golangci-lint` automatically.
* All dependencies must be defined in the `go.mod` file.
* Advanced IDEs and code editors (like VSCode) will take care of that, but to be sure, run `go mod tidy` to validate dependencies.
* For details on the approved style, check out [Effective Go](https://golang.org/doc/effective_go.html).

### License

By contributing your code, you agree to license your contribution under the terms of the [MIT License](https://github.com/hueristiq/xsubfind3r/blob/master/LICENSE).

All files are released with the MIT license.
Loading

0 comments on commit 976bfd7

Please sign in to comment.