Skip to content

Conversation

@LucasAVasco
Copy link
Contributor

No description provided.


---Baseline file (use the baseline name in the example at https://github.com/gitleaks/gitleaks?tab=readme-ov-file#creating-a-baseline)
---@type string
local baseline = vim.fn.findfile("gitleaks-report.json", ".;")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be left out and delegated to user's to configure themselves? Looks gitleaks also works without setting it.

Without it, the linter could be static instead of a function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the baseline path is constant (the gitleaks command is too), so we can move it outside the function and make the linter completely static.

Would you prefer to add a variable to set the baseline path (e.g., 'vim.g.nvim_lint_gitleaks_baseline'), or remove it and have the user override the linter command to set it?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you prefer to add a variable to set the baseline path (e.g., 'vim.g.nvim_lint_gitleaks_baseline'), or remove it and have the user override the linter command to set it?

Remove it and have the user override the linter command to set it. That's already documented and the pattern used by other linters so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants