chore: remove abandoned linter

pull/172/head
moonD4rk 2 years ago
parent 0559ed7f8d
commit 714e8a57b9
No known key found for this signature in database
GPG Key ID: 5AB6217E08D39ABA
  1. 8
      .golangci.yml
  2. 0
      internal/provider/chromium/chromium.go
  3. 0
      internal/provider/chromium/chromium_darwin.go
  4. 0
      internal/provider/chromium/chromium_linux.go
  5. 0
      internal/provider/chromium/chromium_windows.go
  6. 0
      internal/provider/firefox/firefox.go
  7. 27
      internal/provider/provider.go
  8. 2
      internal/provider/provider_darwin.go
  9. 2
      internal/provider/provider_linux.go
  10. 2
      internal/provider/provider_windows.go

@ -8,7 +8,6 @@ run:
linters: linters:
enable: enable:
- 'asciicheck' - 'asciicheck'
- 'deadcode'
- 'depguard' - 'depguard'
- 'dogsled' - 'dogsled'
- 'errorlint' - 'errorlint'
@ -29,7 +28,6 @@ linters:
- 'revive' - 'revive'
- 'typecheck' - 'typecheck'
- 'unconvert' - 'unconvert'
- 'varcheck'
- 'whitespace' - 'whitespace'
disable: disable:
# unsupported lint with golang 1.18+ ref: https://github.com/golangci/golangci-lint/issues/2649 # unsupported lint with golang 1.18+ ref: https://github.com/golangci/golangci-lint/issues/2649
@ -42,6 +40,8 @@ linters:
- 'stylecheck' - 'stylecheck'
- 'unused' - 'unused'
- 'errcheck' - 'errcheck'
- 'deadcode'
- 'varcheck'
issues: issues:
exclude-use-default: false exclude-use-default: false
@ -60,10 +60,8 @@ issues:
- G502 - G502
- G505 - G505
exclude-rules: exclude-rules:
- path: internal/browser/browser\.go - path: internal/provider/provider\.go
linters: linters:
- 'deadcode'
- 'varcheck'
- 'unused' - 'unused'
max-issues-per-linter: 0 max-issues-per-linter: 0
max-same-issues: 0 max-same-issues: 0

@ -1,4 +1,4 @@
package browser package provider
import ( import (
"os" "os"
@ -6,23 +6,16 @@ import (
"sort" "sort"
"strings" "strings"
"hack-browser-data/internal/browingdata" "hack-browser-data/internal/browser"
"hack-browser-data/internal/browser/chromium"
"hack-browser-data/internal/browser/firefox"
"hack-browser-data/internal/log" "hack-browser-data/internal/log"
"hack-browser-data/internal/provider/chromium"
"hack-browser-data/internal/provider/firefox"
"hack-browser-data/internal/utils/fileutil" "hack-browser-data/internal/utils/fileutil"
"hack-browser-data/internal/utils/typeutil" "hack-browser-data/internal/utils/typeutil"
) )
type Browser interface { func PickBrowsers(name, profile string) ([]browser.Browser, error) {
// Name is browser's name var browsers []browser.Browser
Name() string
// BrowsingData returns all browsing data in the browser.
BrowsingData() (*browingdata.Data, error)
}
func PickBrowser(name, profile string) ([]Browser, error) {
var browsers []Browser
clist := pickChromium(name, profile) clist := pickChromium(name, profile)
for _, b := range clist { for _, b := range clist {
if b != nil { if b != nil {
@ -38,8 +31,8 @@ func PickBrowser(name, profile string) ([]Browser, error) {
return browsers, nil return browsers, nil
} }
func pickChromium(name, profile string) []Browser { func pickChromium(name, profile string) []browser.Browser {
var browsers []Browser var browsers []browser.Browser
name = strings.ToLower(name) name = strings.ToLower(name)
if name == "all" { if name == "all" {
for _, v := range chromiumList { for _, v := range chromiumList {
@ -77,8 +70,8 @@ func pickChromium(name, profile string) []Browser {
return browsers return browsers
} }
func pickFirefox(name, profile string) []Browser { func pickFirefox(name, profile string) []browser.Browser {
var browsers []Browser var browsers []browser.Browser
name = strings.ToLower(name) name = strings.ToLower(name)
if name == "all" || name == "firefox" { if name == "all" || name == "firefox" {
for _, v := range firefoxList { for _, v := range firefoxList {

@ -1,6 +1,6 @@
//go:build darwin //go:build darwin
package browser package provider
import ( import (
"hack-browser-data/internal/item" "hack-browser-data/internal/item"

@ -1,6 +1,6 @@
//go:build linux //go:build linux
package browser package provider
import ( import (
"hack-browser-data/internal/item" "hack-browser-data/internal/item"

@ -1,6 +1,6 @@
//go:build windows //go:build windows
package browser package provider
import ( import (
"hack-browser-data/internal/item" "hack-browser-data/internal/item"
Loading…
Cancel
Save