Improve python code indentation warning / error messages
This commit is contained in:
parent
a779f9bbc1
commit
e69cc0c0f5
6 changed files with 55 additions and 23 deletions
|
|
@ -1 +1 @@
|
|||
swig_pythoncode_bad.i:7: Error: Line indented less than expected (line 2 of pythoncode)
|
||||
swig_pythoncode_bad.i:7: Error: Line indented less than expected (line 2 of %pythoncode or %insert("python") block) as no line should be indented less than the indentation in line 1
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
swig_pythoncode_bad2.i:13: Error: Line indented less than expected (line 3 of pythoncode)
|
||||
swig_pythoncode_bad2.i:13: Error: Line indented less than expected (line 3 of %pythoncode or %insert("python") block) as no line should be indented less than the indentation in line 1
|
||||
|
|
|
|||
7
Examples/test-suite/errors/swig_pythoncode_bad3.i
Normal file
7
Examples/test-suite/errors/swig_pythoncode_bad3.i
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
%module xxx
|
||||
|
||||
%pythoncode %{
|
||||
def extra():
|
||||
print "extra a" # indentation is 2 spaces then tab
|
||||
print "extra b" # indentation is tab then 2 spaces
|
||||
%}
|
||||
1
Examples/test-suite/errors/swig_pythoncode_bad3.stderr
Normal file
1
Examples/test-suite/errors/swig_pythoncode_bad3.stderr
Normal file
|
|
@ -0,0 +1 @@
|
|||
swig_pythoncode_bad3.i:7: Warning 740: Whitespace indentation is inconsistent compared to earlier lines (line 3 of %pythoncode or %insert("python") block)
|
||||
Loading…
Add table
Add a link
Reference in a new issue