Skip to content

Branch analysis not working when default severity is mentioned #4835

@Vishal1297

Description

@Vishal1297

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

Description of the problem

Hi,

I am trying golangici-lint after a long time on a sample code in pushed to a branch.
After adding the code, I tried running the golangci-lint but it fails to report issues when I mention default severity.

Version of golangci-lint

$ golangci-lint --version
# golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z

Configuration

run:
  timeout: 5m
  issues-exit-code: 0
  modules-download-mode: readonly
  tests: false

linters:
  disable-all: true
  enable:
    - errcheck
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - unused

issues:
  exclude-use-default: true
  exclude-dirs-use-default: true
  new: true

severity:
  default-severity: "error"

output:
  formats:
    - format: colored-line-number
      path: stderr
    - format: checkstyle
      path: report.xml

Go environment

$ go version && go env
go version go1.21.1 linux/amd64

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
INFO golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z 
INFO [config_reader] Config search paths: [./ /home/vishal/DEV/OpenSource/graphql-go /home/vishal/DEV/OpenSource /home/vishal/DEV /home/vishal /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 6 linters: [errcheck gosimple govet ineffassign staticcheck unused] 
INFO [loader] Go packages loading at mode 575 (exports_file|types_sizes|compiled_files|deps|files|imports|name) took 258.700206ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 8.573195ms 
INFO [linters_context/goanalysis] analyzers took 0s with no stages 
INFO [runner] Issues before processing: 18, after processing: 0 
INFO [runner] Processors filtering stat (out/in): nolint: 13/18, skip_dirs: 18/18, skip_files: 18/18, identifier_marker: 18/18, exclude-rules: 18/18, uniq_by_line: 12/13, filename_unadjuster: 18/18, invalid_issue: 18/18, path_prettifier: 18/18, exclude: 18/18, cgo: 18/18, diff: 0/12, autogenerated_exclude: 18/18 
INFO [runner] processing took 10.550511ms with stages: diff: 7.569925ms, nolint: 1.829367ms, exclude-rules: 458.25µs, identifier_marker: 253.113µs, path_prettifier: 171.827µs, autogenerated_exclude: 156.878µs, skip_dirs: 96.037µs, uniq_by_line: 3.614µs, cgo: 3.272µs, invalid_issue: 2.56µs, max_same_issues: 1.446µs, filename_unadjuster: 912ns, max_per_file_from_linter: 538ns, fixer: 421ns, max_from_linter: 421ns, skip_files: 356ns, sort_results: 350ns, path_shortener: 309ns, severity-rules: 258ns, source_code: 258ns, exclude: 237ns, path_prefixer: 162ns 
INFO [runner] linters took 108.358104ms with stages: goanalysis_metalinter: 97.665948ms 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 5 samples, avg is 35.2MB, max is 50.6MB 
INFO Execution took 380.1793ms 

A minimal reproducible example or link to a public repository

https://github.com/Vishal1297/graphql-go/tree/vishal/try-golangci-lint

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions