Commit Graph

57 Commits

Author SHA1 Message Date
Vedant Kumar
53f48f8d8b Hook compiler-rt up to the swift build system 2016-03-17 17:44:05 -07:00
Ted Kremenek
065b2f01a4 Merge pull request #1617 from seabaylea/clone-recursive
clone dependent submodules using --recursive
2016-03-16 20:06:29 -07:00
practicalswift
1edb62dc38 [Python] Make flake8 linting pass without errors/warning (w/ default rules) 2016-03-13 20:19:51 +01:00
practicalswift
a27e9183ba [Python] Fix recently introduced PEP-8 regressions 2016-03-11 20:36:03 +01:00
practicalswift
8bf6df8539 Merge pull request #1615 from practicalswift/remove-global-ignores-add-local-noqa
[Python] Replace global linting excludes with local line-level excludes ("noqa")
2016-03-11 14:42:15 +01:00
Mishal Shah
2eb7432999 [Utils] Add support to clone master-next branch 2016-03-10 14:06:07 -08:00
seabaylea
b09b03bd8d clone dependent submodules using --recursive 2016-03-10 15:44:51 +00:00
practicalswift
d5326bfdc4 [Python] Replace global linting excludes with local line-level excludes ("noqa")
Replace the project global linting rule excludes (as defined in .pep8) with
fine-grained "# noqa" annotations.

By using noqa annotation the excludes are made on a per line basis instead of
globally.

These annotations are used where we make deliberate deviations from the standard
linting rules.

To lint the Python code in the project:

  $ flake8

To install flake8:

  $ pip install flake8

See https://flake8.readthedocs.org/en/latest/ for details.

To enable checking of the PEP-8 naming conventions, install the optional
extension pep8-naming:

  $ pip install pep8-naming

To enable checking of blind "except:" statements, install the optional
extension flake8-blind-except:

  $ pip install flake8-blind-except

To enable checking of import statement order, install the optional
extension flake8-import-order:

  $ pip install flake8-import-order
2016-03-10 16:22:48 +01:00
practicalswift
0796eaad1f [Python] Fix 80-column violations 2016-03-09 23:52:11 +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
Enrico Granata
66b0b57b8f Fix grammar issue in help text 2016-02-25 10:32:46 -08:00
practicalswift
0a33ff727c Fix new PEP8 violation: "continuation line with same indent as next logical line" 2016-02-20 16:49:25 +01:00
Dmitri Gribenko
e3542446cb update-checkout: add an option to skip given repositories 2016-02-20 03:10:53 -08:00
Dmitri Gribenko
75c101d980 update-checkout: change --clone to also update repositories
--clone used to skip updating the repositories, which was causing
confusion.  Developers expect update-checkout to update their local
copy, and optionally clone extra repositories.
2016-02-20 02:45:08 -08:00
Shun Takebayashi
59a046b9bd Rename --fast to --skip-history 2016-02-16 21:59:27 +09:00
Shun Takebayashi
5e75a1ca7e Add --fast flag to utils/update-checkout 2016-02-11 10:49:51 +09:00
Kevin Ballard
25acbd912b [update-checkout] Always update llvm/clang/llbuild
Get rid of the `--all` flag, since having an out-of-date llvm or clang
can cause build failures, and it's not immediately obvious that
`swift/utils/update-checkout` isn't updating those repos.
2016-02-08 20:56:30 -08:00
Luke Larson
0356ec8ec3 Add Swift Benchmark Suite 2016-02-08 10:47:58 -08:00
Mishal Shah
1a752bd5eb [utils] fix work-tree path in update-checkout script 2016-02-02 19:01:06 -08:00
Dmitri Gribenko
ae6db3ae50 update-checkout: only check for uncommitted changes when switching branches 2016-02-02 10:09:39 -08:00
practicalswift
de94f769d5 [Python] Fix PEP 8 rule: E231 missing whitespace after ',' 2016-02-02 09:36:31 +01:00
Mishal Shah
6e66d6caef [utils] Check repo status before updating repos 2016-02-01 21:21:48 -08:00
Mishal Shah
555cabfe29 [utils] Support to use --branch with update feature 2016-02-01 20:51:33 -08:00
Mishal Shah
2b4ca4e120 [utils] replace opts with arguments 2016-02-01 20:21:28 -08:00
Mishal Shah
18ab61f6c0 [utils] Add support to checkout specific branch 2016-02-01 18:30:34 -08: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
David Grove
06860a4d01 Initial integration of libdispatch into build-script
Extend build-script, build-script-impl, and update-checkout
to include libdispatch.  For now, libdispatch is not
built by default (user must enable via command line
argument).

Integration of testing is functional, but should be improved
in a later pull request.  The basic autotools based test
harness does not give the nice high-level progress output
as the rest of the test suite.

A related pull request to libdispatch (#34) has some fixes
to the autotools build that are needed to enable the test
target to succeed when run in an external directory.
2016-01-21 19:22:45 +00: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
Chris Lattner
a30ae2bf55 Merge pull request #836 from zachpanz88/new-year
Update copyright date
2015-12-31 19:36:14 -08:00
practicalswift
6b73cabf08 Remove unused imports. 2016-01-01 03:57:06 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Dave Abrahams
b71e919b55 utils/update-checkout: remove SVN support 2015-12-31 08:26:28 -08:00
Dave Abrahams
728ad26e60 utils/update-checkout: support autostash when pulling
Setting rebase.autostash allows one to do an update-checkout with a
dirty working tree.
2015-12-30 08:53:39 -08:00
Dmitri Gribenko
e0479df372 update-checkout: Python 3 compatibility fix (dict.iteritems()) 2015-12-25 12:42:11 +02:00
Brian Gesiak
a45a4260d8 [python] Use PEP-0008 compliant code headers
Running the Python style guide checker
[`pep8`](https://pypi.python.org/pypi/pep8) on the Python code headers
in this repository results in the following error being emitted:

    $ pep8 utils/build-script
    utils/build-script:1:1: E265 block comment should start with '# '
    utils/build-script:3:1: E266 too many leading '#' for block comment
    utils/build-script:5:1: E266 too many leading '#' for block comment
    utils/build-script:6:1: E266 too many leading '#' for block comment
    utils/build-script:8:1: E266 too many leading '#' for block comment
    utils/build-script:9:1: E266 too many leading '#' for block comment
    utils/build-script:11:1: E265 block comment should start with '# '
    utils/build-script:11:80: E501 line too long (80 > 79 characters)

The problem is that the code header used in most Python files in the
repository:

1. Do not place a space in between `#` and the rest of the comment.
2. Contains some lines that just barely exceed the recommend length
   limit.

In addition, not all code headers in the repository follow the same
template.

This commit moves all Python code headers to the following template:

    # subfolder/file_name.py - Very brief description -*- python -*--
    #
    # This source file is part of the Swift.org open source project
    #
    # Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
    # Licensed under Apache License v2.0 with Runtime Library Exception
    #
    # See http://swift.org/LICENSE.txt for license information
    # See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
    #
    # -----------------------------------------------------------------------------
    #
    # This file contains stuff that I am describing here in the header and will
    # be sure to keep up to date.
    #
    # ----------------------------------------------------------------------------
2015-12-24 11:35:53 -05:00
practicalswift
a8cabe6cbf Use explicit imports. 2015-12-24 00:19:30 +01:00
practicalswift
4da94478a0 Use "if cond is True" instead of discouraged "if cond == True". 2015-12-21 10:24:48 +01:00
Mishal Awadah
b70af8ae08 [build-script] Enable snapshot testing in OSX and Linux buildbots.
Add a swift-integration-tests entry in the update-checkout script.
2015-12-18 13:34:41 -08:00
Michael Gottesman
52fa3520ce [update-checkout] When pulling with a git repo, use --rebase to help people follow the current git workflow (i.e. rebase instead of merge).
When/if that policy changes, we can remove this.
2015-12-15 00:43:59 -06:00
Dmitri Gribenko
dbb3fa44e3 update-checkout: make cloning idempotent and incremental 2015-12-10 19:14:21 -07:00
Dmitri Gribenko
6a329eb1c6 update-checkout: clone additional repositories relative to 'swift' 2015-12-10 19:09:36 -07:00
Dmitri Gribenko
b4b7e2b3cf update-checkout: don't run 'git pull' if we just cloned the repository 2015-12-10 18:12:05 -07:00
Brandon Mathis
f9bc59b252 Uncomment update_working_copy code 2015-12-08 15:24:53 -05:00
Brandon Mathis
b0c4fbd242 Added option install with ssh param 2015-12-08 15:23:42 -05:00
Brandon Mathis
26508ca334 Merge branch 'master' into feature/easier-install 2015-12-04 11:03:16 -05:00
Brandon Mathis
2942c32781 Make changes per @gribozavr suggestions 2015-12-03 19:39:47 -05:00
Brandon Mathis
74a1d0592c Move additional repo cloning into the update-checkout py script 2015-12-03 18:33:46 -05:00
James McLaughlin
9da5899652 Consistently use env(1) to resolve bash and python paths 2015-12-03 20:55:27 +00:00
Mishal Awadah
4a11d81e72 [update-checkout] Follow up 32f8492936
Update the local names of XCTest and Foundation.
2015-11-30 11:25:33 -08:00
Mishal Awadah
db87baf411 [update-checkout] Add XCTest and Foundation. 2015-11-11 13:55:52 -08:00