Improve python code indentation warning / error messages

This commit is contained in:
William S Fulton 2015-07-29 18:57:09 +01:00
commit e69cc0c0f5
6 changed files with 55 additions and 23 deletions

View file

@ -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

View file

@ -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

View 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
%}

View 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)