Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[auditbeat] fix golangci lint errors #37063

Merged
merged 4 commits into from
Nov 10, 2023
Merged

[auditbeat] fix golangci lint errors #37063

merged 4 commits into from
Nov 10, 2023

Conversation

mmat11
Copy link
Contributor

@mmat11 mmat11 commented Nov 7, 2023

Proposed commit message

  • Fix auditbeat's golangci-lint errors
  • Fix exclude rule for logp.TestingSetup() and add exclude rule for logp.DevelopmentSetup()
  • Standardize all instances of logp.TestingSetup() and logp.DevelopmentSetup() to not check for errors

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

@mmat11 mmat11 added cleanup Team:Security-Linux Platform Linux Platform Team in Security Solution labels Nov 7, 2023
@mmat11 mmat11 requested a review from a team November 7, 2023 18:48
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Nov 7, 2023
@mergify mergify bot assigned mmat11 Nov 7, 2023
Copy link
Contributor

mergify bot commented Nov 7, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @mmat11? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@mmat11 mmat11 changed the title auditbeat: fix golangci lint errors [auditbeat] fix golangci lint errors Nov 7, 2023
@mmat11 mmat11 marked this pull request as ready for review November 7, 2023 18:57
@mmat11 mmat11 requested a review from a team as a code owner November 7, 2023 18:57
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 7, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-11-10T19:18:07.545+0000

  • Duration: 154 min 59 sec

Test stats 🧪

Test Results
Failed 0
Passed 27882
Skipped 1845
Total 29727

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mmat11 mmat11 force-pushed the matt/auditbeat-fix-lint branch 3 times, most recently from feb87fe to 404c45e Compare November 7, 2023 20:13
auditbeat/helper/hasher/hasher.go Outdated Show resolved Hide resolved
auditbeat/module/auditd/config_test.go Outdated Show resolved Hide resolved
auditbeat/module/file_integrity/eventreader_test.go Outdated Show resolved Hide resolved
@mmat11 mmat11 force-pushed the matt/auditbeat-fix-lint branch from 404c45e to 490f2e4 Compare November 8, 2023 03:27
@mmat11 mmat11 requested a review from a team as a code owner November 8, 2023 14:15
@mmat11 mmat11 requested review from belimawr and rdner November 8, 2023 14:15
@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Nov 8, 2023
@mmat11 mmat11 force-pushed the matt/auditbeat-fix-lint branch from 4ae4ba5 to c6c243a Compare November 8, 2023 15:27
@mmat11 mmat11 requested review from a team as code owners November 8, 2023 15:27
Copy link
Contributor

mergify bot commented Nov 8, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b matt/auditbeat-fix-lint upstream/matt/auditbeat-fix-lint
git merge upstream/main
git push upstream matt/auditbeat-fix-lint

@mmat11 mmat11 force-pushed the matt/auditbeat-fix-lint branch from c6c243a to 1a31db0 Compare November 8, 2023 15:39
@mmat11 mmat11 force-pushed the matt/auditbeat-fix-lint branch from 1a31db0 to f51af24 Compare November 8, 2023 16:22
auditbeat/module/auditd/audit_linux_test.go Outdated Show resolved Hide resolved
@mmat11 mmat11 force-pushed the matt/auditbeat-fix-lint branch 2 times, most recently from 52e9f61 to e30ea90 Compare November 10, 2023 15:01
@mmat11 mmat11 force-pushed the matt/auditbeat-fix-lint branch from e30ea90 to 156a14d Compare November 10, 2023 19:17
@mmat11 mmat11 enabled auto-merge (squash) November 10, 2023 19:18
@mmat11 mmat11 merged commit 65a7833 into main Nov 10, 2023
15 of 17 checks passed
@mmat11 mmat11 deleted the matt/auditbeat-fix-lint branch November 10, 2023 21:52
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
* auditbeat: fix golangci lint errors

* golangci-lint: fix logp exclude rules

* golangci-lint: remove error checks from all instances of logp.TestingSetup()

* golangci-lint: remove error checks from all instances of logp.DevelopmentSetup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Team:Elastic-Agent Label for the Agent team Team:Security-Linux Platform Linux Platform Team in Security Solution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants