Skip to content

Commit

Permalink
Merge pull request #242 from mymmrac/telego-v1.0.0
Browse files Browse the repository at this point in the history
Telego v1.0.0
  • Loading branch information
mymmrac authored Feb 20, 2025
2 parents bfb64b7 + ecba325 commit 904edbc
Show file tree
Hide file tree
Showing 100 changed files with 4,092 additions and 4,464 deletions.
16 changes: 5 additions & 11 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: "mymmrac" # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
patreon: "mymmrac"
custom: [
"https://tronscan.org/#/address/TW6sjDnGbTSpztXrASfD2Pt4JnBqmphRah",
"https://etherscan.io/address/0x45f57E685Ec43053f6803491e7347B95C9573b8A",
]
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ updates:
schedule:
interval: "weekly"
labels:
- ":gear: Github Actions"
- ":gear: GitHub Actions"
- ":shamrock: Dependencies"
64 changes: 22 additions & 42 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ linters:
enable-all: true
disable:
# Disabled because not relevant for this project
- cyclop # Checks function and package cyclomatic complexity
- containedctx # containedctx is a linter that detects struct contained context.Context field
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- dupword # checks for duplicate words in the source code
Expand All @@ -29,42 +30,22 @@ linters:
- wsl # Whitespace Linter - Forces you to use empty lines!

# Disabled because deprecated
- exportloopref # An analyzer that finds exporting pointers for loop variables
- tenv # Tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17

# To see a list of enabled/disabled by current configuration linters:
# golangci-lint linters

# Settings of specific linters
linters-settings:
govet: # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not
# align with the format string
asmdecl: true # report mismatches between assembly files and Go declarations
assign: true # check for useless assignments
atomic: true # check for common mistakes using the sync/atomic package
bools: true # check for common mistakes involving boolean operators
buildtag: true # check that +build tags are well-formed and correctly located
cgocall: true # detect some violations of the cgo pointer passing rules
composites: true # check for unkeyed composite literals
copylocks: true # check for locks erroneously passed by value
errorsas: true # report passing non-pointer or non-error values to errors.As
framepointer: true # report assembly that clobbers the frame pointer before saving it
httpresponse: true # check for mistakes using HTTP responses
ifaceassert: true # detect impossible interface-to-interface type assertions
loopclosure: true # check references to loop variables from within nested functions
lostcancel: true # check cancel func returned by context.WithCancel is called
nilfunc: true # check for useless comparisons between functions and nil
printf: true # check consistency of Printf format strings and arguments
shift: true # check for shifts that equal or exceed the width of the integer
sigchanyzer: true # check for unbuffered channel of os.Signal
stdmethods: true # check signature of methods of well-known interfaces
stringintconv: true # check for string(int) conversions
structtag: true # check that struct field tags conform to reflect.StructTag.Get
testinggoroutine: true # report calls to (*testing.T).Fatal from goroutines started by a test.
tests: true # check for common mistaken usages of tests and examples
unmarshal: true # report passing non-pointer or non-interface values to unmarshal
unreachable: true # check for unreachable code
unsafeptr: true # check for invalid conversions of uintptr to unsafe.Pointer
unusedresult: true # check for unused results of calls to some functions
# Enable all analyzers.
# Default: false
enable-all: true
# Disable analyzers by name.
# Run `go tool vet help` to see all analyzers.
# Default: []
disable:
- fieldalignment # check for struct field alignments
gocyclo: # Computes and checks the cyclomatic complexity of functions
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 15
Expand Down Expand Up @@ -104,9 +85,6 @@ linters-settings:
# Make an issue if func has more lines of code than this setting, and it has naked returns; default is 30
# decided to use 3 to exclude long functions with named returns which can be a potential source of many errors / bugs
max-func-lines: 3
staticcheck: # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
# Include tests in the analysis.
tests: true
funlen: # Tool for detection of long functions
lines: 120
statements: 40
Expand Down Expand Up @@ -137,9 +115,7 @@ linters-settings:
disabled: true
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity
- name: cognitive-complexity
severity: warning
disabled: false
arguments: [ 20 ]
disabled: true # Duplicate: gocognit
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#comment-spacings
- name: comment-spacings
severity: warning
Expand All @@ -148,9 +124,7 @@ linters-settings:
- nolint
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic
- name: cyclomatic
severity: warning
disabled: false
arguments: [ 15 ]
disabled: true # Duplicate: gocyclo
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header
- name: file-header
disabled: true
Expand All @@ -177,10 +151,6 @@ linters-settings:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver
- name: unused-receiver
disabled: true
cyclop:
# The maximal code complexity to report.
# Default: 10
max-complexity: 15

issues:
# Excluding configuration per-path, per-linter, per-text and per-source
Expand All @@ -197,6 +167,16 @@ issues:
- maintidx
- revive

# Exclude linters for types file
- path: "types.go"
linters:
- funlen

# Exclude linters for methods file
- path: "methods.go"
linters:
- lll

# Which dirs to exclude: 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.
Expand Down
Loading

0 comments on commit 904edbc

Please sign in to comment.