Stop leaks. Safeguard your secrets with GitGuardian. GitGuardian actively prevents accidental exposure of sensitive information in your code, allowing you to code confidently and maintain the integrity of your data.
This MR does a lot of things and is best reviewed commit by commit. Here are the list of commits :
chore(status_bar): refactor status bar item : This puts all logic related to the statusBar into the gitguardian-status-bar.ts. This allows functions that need to update the statusBarItem to be in other files than extension.ts since they no longer need to pass the statusBarItem as argument to updateStatusBarItem
chore(scan): separate scan function into separate file : This makes use of the first commit to move scanFile to the ggshield-api.test.ts and merge it with ggshieldScanFile, so that all logic related to scanning is no longer in extension.ts, but in its dedicated file.
feat(scan): prevent scanning gitignored files : This adds a test at the beginning of scanFile in order to prevent scanning gitignored files, and instead display "Ignored File" in the statusBarItem. This commit also adds tests on scanFile
This MR does a lot of things and is best reviewed commit by commit. Here are the list of commits :
gitguardian-status-bar.ts
. This allows functions that need to update the statusBarItem to be in other files thanextension.ts
since they no longer need to pass the statusBarItem as argument toupdateStatusBarItem
scanFile
to theggshield-api.test.ts
and merge it withggshieldScanFile
, so that all logic related to scanning is no longer inextension.ts
, but in its dedicated file.scanFile
in order to prevent scanning gitignored files, and instead display "Ignored File" in the statusBarItem. This commit also adds tests onscanFile