File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,12 @@ var argv = require('yargs')
1717 desc : 'Output linting results as JSON, equivalent to `-o json`.' ,
1818 type : 'boolean'
1919 } )
20+ . option ( 'c' , {
21+ alias : 'config' ,
22+ desc : 'Path for .dockerfilelintrc configuration file' ,
23+ type : 'string'
24+ } )
2025 . alias ( 'v' , 'version' )
21- . version ( ( ) => require ( '../package.json' ) . version )
2226 . help ( ) . alias ( 'h' , 'help' )
2327 . example ( 'dockerfilelint Dockerfile' , 'Lint a Dockerfile in the current working directory\n' )
2428 . example ( 'dockerfilelint test/example/* -j' , 'Lint all files in the test/example directory and output results in JSON\n' )
@@ -64,7 +68,7 @@ argv._.forEach((fileName) => {
6468 if ( stats . isFile ( ) ) {
6569 fileContent = fs . readFileSync ( fileName , 'UTF-8' ) ;
6670 var root = ( os . platform == "win32" ) ? process . cwd ( ) . split ( path . sep ) [ 0 ] : "/" ;
67- configFilePath = path . resolve ( path . dirname ( fileName ) ) ;
71+ configFilePath = argv . config || path . resolve ( path . dirname ( fileName ) ) ;
6872 }
6973 } catch ( e ) {
7074 if ( e . code === 'ENOENT' ) {
You can’t perform that action at this time.
0 commit comments