Commit Graph

50 Commits

Author SHA1 Message Date
Dave Abrahams
b52cf92609 Merge pull request #8292 from hughbe/gyb-line-direcrtive-cleanup
Cleanup recent line-directive and gyb test fixes
2017-03-26 23:54:40 -07:00
Hugh Bellamy
abfca72357 Run python linting on the file if running doctests 2017-03-27 12:31:56 +07:00
Hugh Bellamy
da9035cbb4 Cleanup recent line-directive and gyb test fixes 2017-03-25 15:45:27 +07:00
Hugh Bellamy
fbb4756cd8 Python-lint line-directive 2017-03-21 14:14:15 +07:00
Hugh Bellamy
53d0fba6e1 Use print_function in line-directive 2017-03-21 11:21:37 +07:00
Hugh Bellamy
79cf3bf171 Add regression test for recent line-directive breakage (SR-4238 ) 2017-03-21 10:32:27 +07:00
Hugh Bellamy
f235a78385 Properly clean up after line-directive doctests now delete=False 2017-03-21 08:29:40 +07:00
Hugh Bellamy
e3604357ea Fix line-directive test failures on Windows 2017-03-21 08:29:40 +07:00
swift-ci
b7163a6434 Merge pull request #8197 from hughbe/replace-line-directive-win-newline 2017-03-20 01:42:13 -07:00
swift-ci
854243b1cb Merge pull request #8192 from hughbe/line-directive-doctests 2017-03-20 00:16:47 -07:00
Hugh Bellamy
ff02ffe0f2 Fix newline errors in line-directive doctests 2017-03-20 14:09:58 +07:00
Hugh Bellamy
a52e7fc8b2 Return error code running line-directive doctests 2017-03-20 13:56:28 +07:00
Hugh Bellamy
995a879967 Use python to invoke line-directive doctests 2017-03-20 13:27:45 +07:00
Dave Abrahams
ea3cb07f10 Revert "Fix line-directive print errors on different python versions" 2017-03-19 14:35:33 -07:00
Dave Abrahams
3ce018e8d1 Revert "Python lint line-directive"
This reverts commit ccb7882ba0, as it broke the
line-directive tool per https://bugs.swift.org/browse/SR-4238
2017-03-19 13:52:43 -07:00
Hugh Bellamy
b43d63dc16 Fix line-directive print errors on different python versions 2017-02-10 14:51:48 +07:00
Hugh Bellamy
ccb7882ba0 Python lint line-directive 2017-02-09 18:15:07 +07:00
Hugh Bellamy
3b4187fcbb Fix line-directive tool to work around Windows command line max limit 2017-01-26 09:34:55 +00:00
practicalswift
a9d6d8938c [gardening] Fix recently introduced typos 2017-01-22 20:40:45 +01:00
Hugh Bellamy
e22e28e6a0 Fix line-directive-tool not being able to invoke swiftc.exe on Windows 2017-01-14 21:45:34 +00:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Ryan Lovelett
aa990aad58 Support Python 3 in the line-directive
* Switched to the "function" format of `RaiseError`
* Switched to the "function" format of `print`
2016-10-29 09:45:36 -04:00
Dave Abrahams
ee20a0193d [utils/line-directive] add reverse mapping
This will be useful for tooling involving gyb files.
2016-09-25 17:09:37 -07:00
Dave Abrahams
e253016a8d [utils/line-directive] add tests
in preparation for refactoring.
2016-09-25 16:40:03 -07:00
Michael Gottesman
07b463ba3e [gardening] Fix some python lint errors so this change is python lint clean. 2016-08-01 15:11:09 -07:00
Dave Abrahams
3f9b6aef01 utils/line-directive: cover type checker errors
This causes errors to be reported in the source file for things
generated by gyb.
2016-07-21 15:36:55 -07:00
practicalswift
da24168735 [Python] Fix recently introduced PEP-8 regression 2016-03-12 20:50:08 +01:00
Chris Lattner
7cbd5d96c3 update line-directive for #sourceLocation. 2016-03-12 09:25:29 -08:00
practicalswift
0796eaad1f [Python] Fix 80-column violations 2016-03-09 23:52:11 +01:00
Brian Gesiak
c9000af795 Merge pull request #1526 from practicalswift/fix-pep8-violations-ii
[Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
2016-03-08 23:55:46 -05:00
practicalswift
265835fdfc [Python] Use consistent import ordering for Python code
Ordering used:
1.) standard library imports
2.) third party imports
3.) local package imports

Each group is individually alphabetized.
2016-03-07 23:25:16 +01:00
practicalswift
183da818df [Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
* E101: indentation contains mixed spaces and tabs
* E111: indentation is not a multiple of four
* E128: continuation line under-indented for visual indent
* E302: expected 2 blank lines, found 1
* W191: indentation contains tabs
2016-03-07 22:36:23 +01:00
Daniel Duan
f14182a2b7 [Utils] replace #line with #setline in utils/line-directive 2016-03-01 23:08:54 -08:00
practicalswift
e395ea0f0e [Python] Follow standard Python docstrings conventions (PEP-0257).
https://www.python.org/dev/peps/pep-0257/
2016-02-20 17:11:57 +01:00
practicalswift
33452564f6 PEP8: Fix violations of type "continuation line under-indented for hanging indent" (E121) 2016-01-24 09:47:53 +01:00
practicalswift
84a31184c7 PEP8: Fix all violations of type "missing whitespace after ','" (E231) 2016-01-24 09:40:32 +01:00
practicalswift
1cd4d4e9c9 [gardening] Fix violations of non-controversial PEP8 rules
Fixes:
* multiple statements on one line (colon) (E701)
* missing whitespace around arithmetic operator (E226)
* missing whitespace around operator (E225)
* closing bracket does not match visual indentation (E124)
* blank line contains whitespace (W293)
* continuation line missing indentation or outdented (E122)
* continuation line over-indented for hanging indent (E126)
* missing expected blank line (E301)
* trailing whitespace (W291)
* unexpected spaces around keyword / parameter equals (E251)
* whitespace after '(', '[' or '{' (E201)
* whitespace before ')', ']' or '}' (E202)
* whitespace before ',' or ':' (E203)
2016-01-23 09:23:33 +01:00
practicalswift
22d043fcc0 [gardening] Fix violations of non-controversial PEP8 rules.
Fixes:
* blank line at end of file
* closing bracket does not match indentation of opening bracket's line
* continuation line over-indented for hanging indent
* continuation line over-indented for visual indent
* continuation line unaligned for hanging indent
* inline comment should start with '# '
* missing whitespace around arithmetic operator
* missing whitespace around bitwise or shift operator
* multiple imports on one line
* multiple spaces after ':'
* multiple spaces after operator
2016-01-16 00:47:43 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Ryan Lovelett
8f223005d7 [gyb] Popen explicit string instead of byte sequence
The Popen command on Python returns a byte sequence on stdout by
default. However by sending the constructor the argument
`universal_newlines=True` it forces the Popen to put a string on stdout.

This was not a problem on Python 2 because the Python 2 regex engine
seemed to work find on byte sequences where Python 3's does not. By
explicitly converting everything to a string the same behavior is now
seen on Python 2 and 3.

See: https://docs.python.org/2/library/subprocess.html#frequently-used-arguments
See: https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
2015-12-31 16:51:48 -05:00
Brian Gesiak
0d62ed2cf1 [line-directive] Add code header
Add code headers missing from `utils/line-directive`, as per the template
from #762.
2015-12-29 00:21:42 -05:00
practicalswift
cd337dc83b Remove unused imports. 2015-12-21 10:24:08 +01:00
Dave Abrahams
1c63d9dc7f [line-directive] StdlibUnittest support
Recognize yet more StdlibUnittest output

Swift SVN r23495
2014-11-21 00:24:25 +00:00
Dave Abrahams
43257cbfaa [emacs, line-directive] StdlibUnittest support
Recognize more StdlibUnittest output both in our emacs error parsing
and in the line-directive tool.

Corrected a bug in the emacs error support that caused it to mask one
error format with a second one having the same name

Swift SVN r23464
2014-11-20 03:41:09 +00:00
Dave Abrahams
c1ceaedc1b [utils] line-directive: indentation fix
Swift SVN r16969
2014-04-28 08:40:48 +00:00
Dave Abrahams
7036eaee44 [utils] recognize assertions in line-directive
Swift SVN r16967
2014-04-28 08:32:40 +00:00
Dave Abrahams
19f22d9f57 [utils] gyb/line-directive: fix up line alignment
Needed to properly map a file's first line to itself in the absence of a
directive.  We were also off by two columns due to a stray +2

Swift SVN r15682
2014-03-31 16:37:51 +00:00
Dave Abrahams
c733f3e419 [build] Integrate gyb line-directive processing
Diagnostic output from compiling .swift files is now passed through the
line-directive tool so that errors point back at the original .gyb
files.

Swift SVN r15674
2014-03-31 08:42:56 +00:00
Dave Abrahams
e07dc1d62d [stdlib] add line-directive post-processor
Swift SVN r15344
2014-03-21 22:11:47 +00:00