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

Release/1.59.0 #434

Merged
merged 48 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
445f762
Upgrade dependencies
lindenmckenzie Aug 15, 2023
29cc851
Add linter
lindenmckenzie Aug 15, 2023
25934bc
Remove unnecessary whitespace
lindenmckenzie Aug 15, 2023
8ac5cf3
Use http.NoBody instead of nil
lindenmckenzie Aug 15, 2023
2f2554d
Remove duplicate imports
lindenmckenzie Aug 15, 2023
8530219
Remove ioutil
lindenmckenzie Aug 15, 2023
36ecc2c
Remove deprecated scenario functions
lindenmckenzie Aug 16, 2023
2218b5b
Add nolint to high complexity funcs requiring refactoring
lindenmckenzie Aug 16, 2023
a3d28ec
Ignore invalid gosec errors for sha1
lindenmckenzie Aug 16, 2023
06b3f5c
Prealloc array for performance
lindenmckenzie Aug 16, 2023
bcde59d
Remove init
lindenmckenzie Aug 16, 2023
476462d
Abstract test values to const
lindenmckenzie Aug 16, 2023
114acd0
Remove unneeded urlBuilder
lindenmckenzie Aug 16, 2023
9990c51
Rename vars for consistency
lindenmckenzie Aug 16, 2023
7c9fd33
Refactor NOMIS script to allow deferred calls to complete
lindenmckenzie Aug 16, 2023
2f0f03e
Refactor rangevalcopy
lindenmckenzie Aug 16, 2023
67bb9a6
Remove unnecessary if statement
lindenmckenzie Aug 16, 2023
d00e658
Combine type declarations
lindenmckenzie Aug 16, 2023
d94f678
Blank out unused params
lindenmckenzie Aug 16, 2023
65c978e
Ignore invalid gosec report
lindenmckenzie Aug 16, 2023
a35b629
Fix comment spacing
lindenmckenzie Aug 16, 2023
190d551
Name returned values
lindenmckenzie Aug 16, 2023
8511a03
Remove unused functions
lindenmckenzie Aug 16, 2023
7a2d8fc
Reformat nomis readme
lindenmckenzie Aug 16, 2023
22aaaf0
Abstract test data to function
lindenmckenzie Aug 16, 2023
df1ca60
Remove unneeded conditionals
lindenmckenzie Aug 16, 2023
ca7385f
Improve rangevalcopy
lindenmckenzie Aug 16, 2023
49c4d44
Prealloc slice
lindenmckenzie Aug 16, 2023
980ddac
Catch copier err
lindenmckenzie Aug 16, 2023
c8d7c26
Reduce whitespace
lindenmckenzie Aug 16, 2023
fd18c53
Remove unused ctx
lindenmckenzie Aug 16, 2023
0ff8e57
Combine type declarations
lindenmckenzie Aug 16, 2023
23af902
Lint ignore high complexity
lindenmckenzie Aug 16, 2023
3d65b91
Add readheader timeout
lindenmckenzie Aug 16, 2023
2a9b631
Remove new lines from console logs
lindenmckenzie Aug 16, 2023
74015c6
Remove log.Fatal
lindenmckenzie Aug 16, 2023
b98bbc9
Prefer ++
lindenmckenzie Aug 16, 2023
ad2b06e
Remove unused code
lindenmckenzie Aug 16, 2023
17875de
Blank unused func params
lindenmckenzie Aug 16, 2023
7ba26f7
correct shadow declaration
lindenmckenzie Aug 16, 2023
7782213
Remove whitespace
lindenmckenzie Aug 16, 2023
4f03b5f
Simplify initiatilisation statement
lindenmckenzie Aug 16, 2023
e222928
Ignore unused code for custom test
lindenmckenzie Aug 16, 2023
b4d8ff6
Swap docker image for linting
lindenmckenzie Aug 16, 2023
54a6d96
Update linter version
lindenmckenzie Aug 17, 2023
abe3885
Clarified comment wording
lindenmckenzie Aug 17, 2023
435dfff
Switch to const
lindenmckenzie Aug 17, 2023
6ab52cc
Add to-dos to high complexity nolints
lindenmckenzie Aug 17, 2023
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
92 changes: 92 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# This file was inspired by the golangci-lint one:
# https://github.com/golangci/golangci-lint/blob/master/.golangci.yml
run:
# default concurrency is a available CPU number
concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 10m
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 15
maligned:
suggest-new: true
dupl:
threshold: 100
goconst:
min-len: 3
min-occurrences: 4
misspell:
locale: UK
lll:
line-length: 140
gofmt:
simplify: false
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- wrapperFunc
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- hugeParam

linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- dogsled
- errcheck
- gochecknoinits
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- revive
- gosec
- gosimple
- govet
- ineffassign
- nakedret
- staticcheck
- stylecheck
- typecheck
- unconvert
- unused
- whitespace
- gocognit
- prealloc

issues:
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- path: service/service.go
linters:
- typecheck
- linters:
- govet
text: 'declaration of "(err|ctx)" shadows declaration at'
new: false

# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.53.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ acceptance-web: build

.PHONY: lint
lint:
exit
go install github.com/golangci/golangci-lint/cmd/[email protected]
golangci-lint run ./...

.PHONY: test
test:
Expand Down
7 changes: 2 additions & 5 deletions NOMIS/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
Upload NOMIS data
==================
# Upload NOMIS data

This utility adds the datasets, instances and edition to the dataset collection stored in mongodb.

### How to run
## How to run

* Go to the root directory
* Run `make nomis` (or) run `go run NOMIS/nomis.go -mongo-url=<url>`

The url should look like the following localhost:27017. If a username and password are needed, follow this structure
`<username>:<password>@<host>:<port>`


Loading