Ben Schumacher
2661f77cea
[MM-64502] Fix errcheck linter errors in channel_test.go ( #31309 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-06-19 14:13:45 +02:00
Arya Khochare
824d3b8259
Fixed errcheck issues in server/channels/app/file_test.go ( #28941 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2025-06-19 11:20:23 +02:00
Ben Schumacher
e3452dce94
[MM-29049] Fix remaining errcheck errors in app, api4 and web package ( #31307 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-06-06 07:44:43 +02:00
Akhil Bisht
4e337b9a43
MM-61450 fix errcheck issue in server/channel/app/permissions_test.go ( #31132 )
2025-06-05 19:43:40 +02:00
Jesse Hallam
e04f487cb8
adopt golangci-lint v2 ( #31222 )
...
* adopt golangci-lint v2
No actual linting changes in this commit, just upgraded tooling and
directives to ignore new linter rules. Adopting v2 solves some
gosec issues in v1 and also happens to be a nice performance boost!
As part of this PR, we also drop support for `MM_NO_ENTERPRISE_LINT`
which hasn't been need for a while anyway.
* simplify: go install is fine!
* missing GOBIN
* golangci-lint: drop legacy preset exclusion
2025-05-30 15:31:30 +00:00
Ben Schumacher
6de3379994
[MM-61099] Fix errcheck issues in server/channels/app/brand.go ( #30679 )
...
* [MM-28779] Fix errcheck issues in server/channels/app/brand.go
Remove brand.go from the errcheck exclusion list in .golangci.yml and fixed the error by properly handling the return value from a.MoveFile().
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
* [MM-28779] Add test to verify brand image backup functionality
Add a new test that verifies backup of the original brand image happens when a new one is uploaded. This helps to ensure the fix for errcheck issues is working as expected.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
* use seperate temporary filestore for each test
* Use FileSettings.Directory instead of finding the dir programatically
* Fix another test
* Fix defer
* Update server/channels/api4/job_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Fix bad bot commit
* Cleanup logs message
* cleanup file path
* Fix error variable names
* WIP:cleanup panic ussage
* Revert "WIP:cleanup panic ussage"
This reverts commit c3284e4427a41c818acc161926cd2535dee9a6b9.
* cleanup error checks
---------
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: Mattermost Build <build@mattermost.com >
2025-05-21 16:35:00 +02:00
Ben Schumacher
bb8aabc15e
[MM-61765] Fix errcheck issues in server/channels/app/platform/license.go ( #30954 )
...
* [MM-61765] Fix errcheck issues in server/channels/app/platform/license.go
- Removed the errcheck exception for license.go from .golangci.yml
- Added proper error handling for RemoveLicense() calls
- Added proper error handling for ReloadConfig() and InvalidateAllCaches() calls
- Updated variable names to avoid conflicts
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
* simplify naming
---------
Co-authored-by: Claude <noreply@anthropic.com >
2025-05-12 13:41:59 +02:00
Ben Schumacher
4dbff921ba
[MM-61499] Fix errcheck issues in server/channels/app/slashcommands/helper_test.go ( #30880 )
2025-05-12 11:20:14 +02:00
Ben Schumacher
cd3046773e
[MM-61498] Fix errcheck issues in server/channels/app/slashcommands/command_test.go ( #30879 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-05-09 13:56:35 +02:00
Ben Schumacher
92011a6c75
[MM-29111] Fix errcheck issues in server/channels/app/upload.go ( #30678 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-05-07 13:40:51 +02:00
Ben Schumacher
bfb15ab179
[MM-61074] Fix errcheck issues in oauth_test.go and web_test.go ( #30707 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-05-07 12:41:10 +02:00
Ben Schumacher
dc2827a63e
[MM-28923] Fix errcheck issues in server/channels/app/file.go ( #30878 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-05-07 10:04:17 +02:00
Ben Schumacher
e10a1309c1
[MM-61774] Fix errcheck issues in server/channels/app/platform/status.go ( #30876 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-05-07 09:04:22 +02:00
Ivy Gesare
1bca62dc83
[MM-61505] Fix errcheck issues in server/channels/app/team_test.go ( #29146 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2025-05-05 12:43:16 +02:00
kasyap dharanikota
ddb4c4360c
fix errcheck in server/channels/app/platform/session.go ( #30595 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2025-05-05 12:18:47 +02:00
Ben Schumacher
df3560ed9c
[MM-61086] Fix errcheck linter issue in batch_worker_test.go ( #30644 )
2025-04-29 11:08:38 +02:00
Ben Schumacher
f1ddeec2f6
[MM-61778] Fix errcheck issues in web_hub_test.go ( #30676 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-29 10:23:53 +02:00
Ben Schumacher
2f5b70bfa2
[MM-29108] Fix errcheck issues in server/channels/app/team.go ( #30683 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-29 09:03:06 +02:00
Ben Schumacher
d0c4780eb1
[MM-28761] Fix errcheck linter issues in hosted_purchase_screening worker ( #30624 )
2025-04-29 08:57:52 +02:00
Ben Schumacher
5ee308bd83
[MM-61467] Fix errcheck linter issues in post_test.go ( #30686 )
2025-04-29 08:50:47 +02:00
Ben Schumacher
cd5523f5fb
MM-29092 Fix error handling in auto_environment.go ( #30610 )
...
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Caleb Roseland <caleb@calebroseland.com >
2025-04-28 15:05:31 +02:00
Ben Schumacher
eea39a5f23
[MM-61087] Fix errcheck linter issues in channels/jobs/helper_test.go ( #30643 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-28 15:02:10 +02:00
Ben Schumacher
6a228877b7
[MM-28762] Fix errcheck issues in jobs.go ( #30708 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-28 14:57:40 +02:00
Ben Schumacher
6fc60c8e5f
[MM-61105] Fix errcheck linter errors in config_test.go ( #30689 )
2025-04-28 14:53:45 +02:00
Ben Schumacher
efd17a37ea
[MM-28948] Fix errcheck linter issues in import_functions.go ( #30615 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-15 09:53:38 +02:00
Ben Schumacher
b7f89984db
[MM-61076] Fix errcheck issues in server/channels/web/saml.go ( #30612 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-15 09:52:28 +02:00
Ben Schumacher
b8ad438c0a
[MM-61515] Fix errcheck linter issues in webhook_test.go ( #30684 )
2025-04-15 09:50:22 +02:00
Arya Khochare
0f860f0512
Fixed errcheck issues in server/channels/app/integration_action.go ( #29040 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2025-04-14 13:56:05 +02:00
kasyap dharanikota
ae046fb34e
fix: handle error from InvalidateAllCaches in slack.go ( #30606 )
...
* fix: hanlde error from InvalidateAllCaches in slack.go
* change signature of InvalidateAllCaches to *model.AppError
* return err from InvalidateAllCaches everywhere
* Formatting
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2025-04-14 10:24:21 +02:00
Ben Schumacher
4d0109feeb
[MM-61082] Fix errcheck issues in license_test.go ( #30617 )
...
* [MM-28754] Fix errcheck issues in license_test.go
- Properly handle error returned from os.WriteFile
- Remove license_test.go from errcheck exceptions list in .golangci.yml
Fixes https://github.com/mattermost/mattermost/issues/28754
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
* Remove empty line
---------
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-14 09:28:28 +02:00
Ben Schumacher
b8bf2e235d
[MM-61463] Fix errcheck issues in post_helpers_test.go ( #30609 )
...
* [MM-61463] Fix errcheck issues in post_helpers_test.go
- Added proper error handling for System.Save calls
- Removed post_helpers_test.go from errcheck ignore list in .golangci.yml
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
* Add back channels/app/plugin_test.go|
* Fix server/.golangci.yml
---------
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-11 13:51:08 +02:00
Ben Schumacher
545de88486
[MM-61079] Fix error checking in webhook.go ( #30611 )
...
* MM-28751 Fix error checking in webhook.go
- Implement proper error checking for r.ParseForm()
- Implement proper error checking for r.ParseMultipartForm()
- Implement proper error checking for w.Write()
- Remove webhook.go exception from .golangci.yml
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
* Fix translation
---------
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-11 12:17:43 +02:00
Arya Khochare
2e2782e4bf
Fixed errcheck issues in server/channels/app/file_bench_test.go ( #29003 )
...
Co-authored-by: Mattermost Build <build@mattermost.com >
2025-04-11 12:12:59 +02:00
Ben Schumacher
748f8227e3
Fix errcheck error in plugin_test.go by properly handling error from th.App.ch.RemovePlugin ( #30608 )
2025-04-11 10:42:16 +02:00
Ben Schumacher
02e5c56d22
MM-60797: Fix errcheck issues in support_packet_test.go ( #30607 )
...
Fixes https://github.com/mattermost/mattermost/issues/29102
- Fix error handling in fileutils.FindDir() call by properly checking the returned boolean value
- Add proper error handling for SetPhase2PermissionsMigrationStatus calls
- Remove channels/app/support_packet_test.go from the errcheck exception list in .golangci.yml
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-09 14:10:08 +02:00
Ben Schumacher
a6492b5b9f
MM-28765: Fix errcheck issues in server/channels/manualtesting/manual_testing.go ( #30613 )
...
1. Fixed hasher.Write() to check error return
2. Fixed VerifyEmail() to check error return
3. Fixed SaveMember() to check error return
4. Added typecheck exclusion for testAutoLink in .golangci.yml
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-authored-by: Claude <noreply@anthropic.com >
2025-04-09 11:41:56 +02:00
enzowritescode
5d7f985997
Add bidichk to the linters ( #30654 )
2025-04-07 08:38:18 -06:00
Ben Schumacher
166a676fe5
Enforce use of any instead of interface{} ( #30588 )
2025-03-31 10:44:34 +02:00
Arya Khochare
e8ef26196c
Fixed errcheck issues in server/channels/app/permissions.go ( #29064 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2025-02-25 10:49:28 +01:00
Seiya Homma
a5faf9e6e3
[MM-61775] Fix errcheck issues in server/channels/app/platform/web_broadcast_hook.go ( #29514 )
...
Co-authored-by: Caleb Roseland <caleb@calebroseland.com >
2025-01-27 11:26:28 +00:00
Arya Khochare
d2b334e605
Fixed errcheck issues in server/channels/app/server.go ( #29425 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2025-01-13 12:06:40 +01:00
Yahya Haq
0482b57bf8
[MM-29441] Fix errcheck issues in web_hub.go ( #29614 )
...
* fix errcheck for web_hub.go
* log user id
2024-12-23 15:09:50 +05:30
TheInvincible
812034f5eb
Update export.go (fix errcheck issue) ( #28971 )
2024-12-20 17:45:13 +01:00
Ivy Gesare
0e4e7ca0b9
[MM-61514] Fix errcheck issues in server/channels/app/web_broadcast_hooks_test.go ( #29213 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
Co-authored-by: Caleb Roseland <caleb@calebroseland.com >
2024-12-17 15:09:24 -06:00
Arya Khochare
cf93d2a14e
Fixed errcheck issues in server/channels/app/export_test.go ( #29004 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2024-12-17 16:15:38 +01:00
Arya Khochare
1f7f0d20cd
Fixed errcheck issues in server/channels/app/migrations.go ( #29067 )
2024-12-17 14:16:37 +01:00
Arya Khochare
cdfadcf47d
Fixed errcheck issues in server/channels/app/security_update_check.go ( #29200 )
2024-12-17 12:52:43 +01:00
Rohan Sharma
a5a92d825a
[MM-61102] Fix errcheck issues in server/channels/app/channel_bookmark_test.go ( #28789 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2024-12-12 16:48:48 +01:00
Ivy Gesare
832b5a3332
[MM-61771] Fix errcheck issues in server/channels/app/platform/service_test.go ( #29375 )
...
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2024-12-12 13:51:16 +01:00
Seiya Homma
55500b573a
[MM-61776] Fix errcheck issues in server/channels/app/platform/web_conn.go ( #29515 )
2024-12-12 12:19:23 +01:00