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 6
6
7
7
namespace PhpMyAdmin \SqlParser \Utils ;
8
8
9
+ use PhpMyAdmin \SqlParser \Context ;
9
10
use PhpMyAdmin \SqlParser \Lexer ;
10
11
use PhpMyAdmin \SqlParser \Parser ;
11
12
@@ -92,9 +93,9 @@ public function usageLint()
92
93
93
94
public function parseLint ()
94
95
{
95
- $ longopts = array ('help ' , 'query: ' );
96
+ $ longopts = array ('help ' , 'query: ' , ' context: ' );
96
97
$ params = $ this ->getopt (
97
- 'hq: ' , $ longopts
98
+ 'hq:c: ' , $ longopts
98
99
);
99
100
$ this ->mergeLongOpts ($ params , $ longopts );
100
101
@@ -112,6 +113,9 @@ public function runLint()
112
113
113
114
return 0 ;
114
115
}
116
+ if (isset ($ params ['c ' ])) {
117
+ Context::load ($ params ['c ' ]);
118
+ }
115
119
if (isset ($ params ['q ' ])) {
116
120
$ lexer = new Lexer ($ params ['q ' ], false );
117
121
$ parser = new Parser ($ lexer ->list );
You can’t perform that action at this time.
0 commit comments