Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aburdulescu committed Mar 1, 2024
0 parents commit aed99f0
Show file tree
Hide file tree
Showing 10 changed files with 573 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/dev.yml
@@ -0,0 +1,39 @@
name: Dev

on:
push:
branches: [main]
paths-ignore:
- '*.md'
- '*.org'
- 'tools/**'

permissions:
contents: read

jobs:

ci:
strategy:
matrix:
go: [1.21.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Disable cgo
run: go env -w CGO_ENABLED=0

- name: make ci
run: make ci

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:

release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
/dhat_ls
/*.txt
/*.html
/dist/
45 changes: 45 additions & 0 deletions .golangci.yml
@@ -0,0 +1,45 @@
linters:
enable:
- errorlint
- unconvert
- unparam
- asasalint
- asciicheck
- bidichk
- bodyclose
- exhaustive
- exportloopref
- forcetypeassert
- goconst
- gocritic
- gofmt
- gosec
- nilerr
- usestdlibvars
- decorder
- dupl
- dupword
- durationcheck
- errname
- gocheckcompilerdirectives
- gochecknoinits
- mirror
- misspell
- predeclared
- reassign
- thelper
- wastedassign
- godox
- lll
- errchkjson
- funlen
- nestif
- prealloc

linters-settings:
funlen:
lines: -1 # don't count lines, only statements
statements: 50
ignore-comments: true
nestif:
min-complexity: 4
27 changes: 27 additions & 0 deletions .goreleaser.yaml
@@ -0,0 +1,27 @@
version: 1

before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
archives:
- wrap_in_directory: true
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
gomod:
proxy: true
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Andrei Burdulescu

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.
12 changes: 12 additions & 0 deletions README.md
@@ -0,0 +1,12 @@
# dhat_ls

Generate a report with all allocations recorded in a DHAT output file.

## Download

Go to the [latest release](https://github.com/aburdulescu/dhat_ls/releases/latest)
and download the binary for your OS and CPU architecture.

## Usage

Run `dhat_ls --help` for usage information.
3 changes: 3 additions & 0 deletions go.mod
@@ -0,0 +1,3 @@
module github.com/aburdulescu/dhat_ls

go 1.21.0

0 comments on commit aed99f0

Please sign in to comment.