-
Notifications
You must be signed in to change notification settings - Fork 53
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
(feat) Add in the ability to pass in -D or --directory if you want to… #186
base: main
Are you sure you want to change the base?
Conversation
… run auditjs on another directory than cwd, default = cwd like normal. Good for global directory
…he node_modules, it trims that
@@ -1,3 +1,4 @@ | |||
{ | |||
"editor.formatOnSave": true | |||
} | |||
"editor.formatOnSave": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to disable this because it was breaking the build on a space it was adding between the {} on https://github.com/sonatype-nexus-community/auditjs/pull/186/files#diff-e2206ba0c17727f95c268ab7b1f899e3R22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shrug. I'm still using IDEA. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^^ noooooob.
Just kidding :)
I'll try and pull this down and take a gander at why it was breaking the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I won't be offended if you'd rather wait for a "non-noob review".
let directory = argv.directory ? argv.directory : process.cwd(); | ||
|
||
if (directory && directory !== process.cwd()) { | ||
console.log('Running on directory', directory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice touch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUGGESTION: Rather than use console.log
, use: logMessage('', DEBUG); at whatever level you'd like to write it to the log.
@@ -1,3 +1,4 @@ | |||
{ | |||
"editor.formatOnSave": true | |||
} | |||
"editor.formatOnSave": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shrug. I'm still using IDEA. ;)
… run auditjs on another directory than cwd, default = cwd like normal. Good for global directory
Add in flag
-D
or--directory
for ossi or iq so you can scan a directory that is not cwd. Handy for global directory scans.This pull request makes the following changes:
It relates to the following issue #s:
cc @bhamail / @DarthHater / @allenhsieh / @ken-duck