mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
chore: add typos check linter in github actions (#285)
* refactor: Disable JSON handling in logger/logger.go. * chore: Standardize spelling and add typos check workflows. - Update GitHub Action name to 'unit tests' - Add spell-check step with custom config to lint workflow - Use latest version of golangci/lint-action in lint workflow - Rename variable 'crypted' to 'encrypted' in crypto_windows.go - Fix typos in comments and error/log messages throughout the codebase - Update .gitignore to exclude typos.toml file
This commit is contained in:
@@ -16,6 +16,12 @@ jobs:
|
||||
go-version: "1.21.x"
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check spelling with custom config file
|
||||
uses: crate-ci/typos@master
|
||||
with:
|
||||
config: ./typos.toml
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
|
||||
@@ -5,7 +5,7 @@ on:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
name: run tests
|
||||
name: unit tests
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
|
||||
+4
-1
@@ -201,4 +201,7 @@ hack-browser-data
|
||||
!/.github/*.md
|
||||
|
||||
# Community
|
||||
!CONTRIBUTING.md
|
||||
!CONTRIBUTING.md
|
||||
|
||||
# CICD Config
|
||||
!typos.toml
|
||||
@@ -46,7 +46,7 @@ func (c *ChromiumLocalStorage) Parse(_ []byte) error {
|
||||
if len(value) < maxLocalStorageValueLength {
|
||||
s.fillValue(value)
|
||||
} else {
|
||||
s.Value = fmt.Sprintf("value is too long, length is %d, supportted max length is %d", len(value), maxLocalStorageValueLength)
|
||||
s.Value = fmt.Sprintf("value is too long, length is %d, supported max length is %d", len(value), maxLocalStorageValueLength)
|
||||
}
|
||||
if s.IsMeta {
|
||||
s.Value = fmt.Sprintf("meta data, value bytes is %v", value)
|
||||
|
||||
@@ -46,7 +46,7 @@ func (c *ChromiumSessionStorage) Parse(_ []byte) error {
|
||||
if len(value) < maxLocalStorageValueLength {
|
||||
s.fillValue(value)
|
||||
} else {
|
||||
s.Value = fmt.Sprintf("value is too long, length is %d, supportted max length is %d", len(value), maxLocalStorageValueLength)
|
||||
s.Value = fmt.Sprintf("value is too long, length is %d, supported max length is %d", len(value), maxLocalStorageValueLength)
|
||||
}
|
||||
if s.IsMeta {
|
||||
s.Value = fmt.Sprintf("meta data, value bytes is %v", value)
|
||||
|
||||
@@ -30,7 +30,7 @@ func DecryptPassForYandex(key, encryptPass []byte) ([]byte, error) {
|
||||
}
|
||||
|
||||
// chromium > 80 https://source.chromium.org/chromium/chromium/src/+/master:components/os_crypt/os_crypt_win.cc
|
||||
func aesGCMDecrypt(crypted, key, nounce []byte) ([]byte, error) {
|
||||
func aesGCMDecrypt(encrypted, key, nounce []byte) ([]byte, error) {
|
||||
block, err := aes.NewCipher(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -39,7 +39,7 @@ func aesGCMDecrypt(crypted, key, nounce []byte) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
origData, err := blockMode.Open(nil, nounce, crypted, nil)
|
||||
origData, err := blockMode.Open(nil, nounce, encrypted, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import (
|
||||
var Default = &Logger{
|
||||
AddSource: true,
|
||||
IsVerbose: false,
|
||||
IsJSONHandler: true,
|
||||
IsJSONHandler: false,
|
||||
Level: slog.LevelWarn,
|
||||
ReplaceAttr: defaultReplaceAttrFunc,
|
||||
Output: os.Stderr,
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# See https://github.com/crate-ci/typos/blob/master/docs/reference.md to configure typos
|
||||
[default.extend-words]
|
||||
Readed = "Readed"
|
||||
Sie = "Sie"
|
||||
OT = "OT"
|
||||
[files]
|
||||
extend-exclude = ["go.mod", "go.sum"]
|
||||
Reference in New Issue
Block a user