Skip to content

Commit 0b3ed35

Browse files
committed
A bit of cleanup
1 parent 0fc346b commit 0b3ed35

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

.golangci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ run:
33
- build
44
- cmake
55
- doc
6+
- kindlegen
7+
- static
8+
- testdata
69
- tools
710
- vendor
8-
- util
911
tests: false
1012
issues-exit-code: 0
1113

@@ -19,22 +21,31 @@ linters:
1921
- gochecknoglobals
2022
- gochecknoinits
2123
- whitespace
24+
- wsl
25+
- gomnd
2226
fast: false
2327

2428
linters-settings:
2529
lll:
2630
# max line length, lines longer will be reported. Default is 120.
2731
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
28-
line-length: 180
32+
line-length: 185
2933
# tab width in spaces. Default to 1.
3034
tab-width: 4
31-
35+
gofmt:
36+
simplify: true
3237
funlen:
33-
lines: 100
34-
statements: 60
38+
lines: 250
39+
statements: 120
40+
dogsled:
41+
max-blank-identifiers: 3
3542

3643
issues:
3744
exclude-rules:
3845
- text: "weak cryptographic primitive"
3946
linters:
4047
- gosec
48+
- text: "Subprocess launched with function call as argument or cmd arguments"
49+
linters:
50+
- gosec
51+

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ endif()
5959

6060
# Project version number
6161
set(PRJ_VERSION_MAJOR 1)
62-
set(PRJ_VERSION_MINOR 4)
62+
set(PRJ_VERSION_MINOR 41)
6363

6464
if (EXISTS "${PROJECT_SOURCE_DIR}/.git" AND IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
6565
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/cmake/githash.sh ${GIT_EXECUTABLE}
@@ -155,19 +155,19 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
155155
########################################################################################################
156156

157157
# Running linters on main target
158-
find_program(GO_LINTER golangci-lint)
158+
find_program(GO_LINTER golangci-lint PATHS ${PROJECT_BINARY_DIR} NO_DEFAULT_PATH)
159159
if(NOT GO_LINTER)
160-
set(golangci-lint-ver "1.17.1")
160+
set(golangci-lint-ver "1.22.2")
161161
message(STATUS "Preparing golangci-lint ${golangci-lint-ver}")
162162
file(DOWNLOAD "https://github.com/golangci/golangci-lint/releases/download/v${golangci-lint-ver}/golangci-lint-${golangci-lint-ver}-linux-amd64.tar.gz" ${PROJECT_BINARY_DIR}/golangci-lint.tar.gz
163163
INACTIVITY_TIMEOUT 60
164164
TIMEOUT 300
165165
STATUS DOWNLOAD_RES
166-
EXPECTED_HASH SHA256=62693d3351858206af0bfe975f7f79a8ac9124502e8de7906f377c231f37f7d3)
166+
EXPECTED_HASH SHA256=109d38cdc89f271392f5a138d6782657157f9f496fd4801956efa2d0428e0cbe)
167167
list(GET DOWNLOAD_RES 0 RES)
168168
list(GET DOWNLOAD_RES 1 MSG)
169169
if(RES)
170-
message(FATAL_ERROR, ${MSG})
170+
message(FATAL_ERROR "${MSG} : ${RES}")
171171
endif()
172172
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf golangci-lint.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
173173
execute_process(COMMAND ${CMAKE_COMMAND} -E copy golangci-lint-${golangci-lint-ver}-linux-amd64/golangci-lint golangci-lint WORKING_DIRECTORY ${PROJECT_BINARY_DIR})

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ After that just execute
5959
Set-Service -StartupType Automatic ssh-agent
6060
```
6161

62-
2. Run `wsl-ssh-agent-gui.exe`. Basically there are several possible scenarios:
62+
2. Run `wsl-ssh-agent-gui.exe` with arguments which make sense for your usage. Basically there are several ways:
6363

6464
* Using `-socket` option specify "well known" path on Windows side and then properly specify the same path in every WSL session:
6565

static/files.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

util/setenv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func notifySystem(debug bool) {
3232
log.Printf("Broadcasting environment change. From %s", start)
3333
}
3434

35-
_, _, _ = proc.Call(uintptr(uintptr(windows.InvalidHandle)),
35+
_, _, _ = proc.Call(uintptr(windows.InvalidHandle),
3636
uintptr(wmSETTINGCHANGE),
3737
0,
3838
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr("Environment"))),

0 commit comments

Comments
 (0)