XiaoMi / soar

SQL Optimizer And Rewriter
Apache License 2.0
8.67k stars 1.32k forks source link

wrong line number in linter with multi-line comment #112

Closed LPX-E5BD8 closed 5 years ago

LPX-E5BD8 commented 5 years ago

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

SQL:

/*
test
*/
select * from tb;

cmd:

soar -query 1.sql -report-type=lint
  1. What did you expect to see?
    1.sql:4:CLA.001 最外层 SELECT 未指定 WHERE 条件
    1.sql:4:COL.001 不建议使用 SELECT * 类型查询
  2. What did you see instead?
    1.sql:1:CLA.001 最外层 SELECT 未指定 WHERE 条件
    1.sql:1:COL.001 不建议使用 SELECT * 类型查询
  3. What version of are you using (soar -version)?
    Version: 2018-11-21 09:55:57 +0800 v0.8.1-88-g6b0730a
    Branch: master
    Compile: 2018-11-21 09:58:45 +0800 by go version go1.10.4 darwin/amd64
    GitDirty: 0