Commit Graph

58 Commits

Author SHA1 Message Date
JP Simard 6712b5488d Merge pull request #1592 from realm/jp-sourcery-master-rule-list
Use Sourcery to generate LinuxMain.swift & MasterRuleList.swift
2017-06-02 15:02:44 -07:00
JP Simard 90ee3d377b fix make docker_test failure after running SwiftPM on Darwin
SwiftPM on Darwin produces a `.xctest` _bundle_ (i.e. folder).
SwiftPM on Linux produces a `.xctest` _binary_ (i.e. file).

SwitPM on Linux exits unsuccessfully if it finds a folder at the `.xctest` location.

```
$ make docker_test
...
Linking ./.build/debug/SwiftLintPackageTests.xctest
/usr/bin/ld.gold: fatal error: ./.build/debug/SwiftLintPackageTests.xctest: open: Is a directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
swift-test: error: exit(1): /usr/bin/swift-build-tool -f .build/debug.yaml test
make: *** [docker_test] Error 1
```

This change detects this scenario and pre-emptively deletes the `.xctest` folder if it exists.
2017-06-02 14:39:02 -07:00
JP Simard f1417da079 preserve Sourcery comment header in make sourcery 2017-06-02 14:28:37 -07:00
JP Simard 9a81734081 use Sourcery to generate MasterRuleList.swift 2017-06-02 14:28:37 -07:00
JP Simard 25a92c4e03 automatically generate LinuxMain.swift using Sourcery
This adds 6 tests that were accidentally not being run on Linux:

* LineLengthConfigurationTests.testLineLengthConfigurationInitialiserSetsIgnoresComments
* LineLengthConfigurationTests.testLineLengthConfigurationInitialiserSetsIgnoresFunctionDeclarations
* LineLengthConfigurationTests.testLineLengthConfigurationThrowsOnBadConfigValues
* LineLengthRuleTests.testLineLengthWithIgnoreCommentsEnabled
* LineLengthRuleTests.testLineLengthWithIgnoreFunctionDeclarationsEnabled
* RegionTests.testSeveralRegionsFromSeveralCommands
2017-06-02 14:28:37 -07:00
JP Simard 0968cf4702 call reset if docker_htop exits unsuccessfully
fixes #1570. From Stack Overflow: https://stackoverflow.com/a/44191071/373262
2017-05-25 16:11:08 -07:00
JP Simard c40fe7c21d commit changes before pushing & tagging 2017-05-22 14:08:17 -07:00
JP Simard e54eeef17e Add make push_version command.
Update 'Master' header with new version & name in CHANGELOG,
commit, tag & push.
2017-05-22 14:05:24 -07:00
JP Simard 0f0f73dacd stop testing with Swift 3.0.2 on Linux 2017-05-19 15:52:26 -07:00
JP Simard 320e9503b1 remove unused spm-related commands from Makefile 2017-05-19 14:16:57 -07:00
JP Simard 5e5a9503a5 add make docker_htop command
docker provides very little insight into what's happening in its
containers, so this command helps keep tabs on what processes are
running.
2017-05-19 12:17:15 -07:00
JP Simard c952c13d8e run docker tests on Swift 3.1.1 2017-05-15 13:42:02 -07:00
JP Simard 2751c3c83d speed up display_compilation_time
by just _building_ tests, not _running_ them.
2017-05-15 13:41:06 -07:00
Marcelo Fabri d73ee8d3d9 Remove Swift 2 support
Also removes `missing_docs` and `valid_docs` rules.

Fixes #1453.
2017-04-23 13:43:41 +02:00
Norio Nomura 58adbf93a1 Add Swift 3.1 on Linux to travis 2017-04-17 17:22:54 +09:00
Norio Nomura fcfb852f5c Fix display_compilation_time target in Makefile for Swift 3.1 2017-04-12 20:40:22 +09:00
JP Simard 510b04a66a use Release mode when running make installables
so far, we've just been "releasing" SwiftLint built in Debug mode
since that's the default and we never specified a configuration 🙀
2017-04-06 16:39:43 -07:00
JP Simard 16ca04905c 0.16.1: Commutative Fabric Sheets 2017-01-20 10:32:33 -08:00
JP Simard a16e77c39e fix swiftlint version with SPM
all done by @marcelofabri, originally in #1073
2017-01-07 00:09:27 -08:00
Marcelo Fabri eb25fad75f Merge pull request #1087 from marcelofabri/swift2-tests
Run tests with Swift 2.3 set for SourceKitten
2016-12-30 02:02:14 -02:00
Marcelo Fabri 3301c1c15a Invert tests order 2016-12-30 01:01:47 -02:00
Marcelo Fabri d75cd234f7 Run tests with Swift 2.3 set for SourceKitten
This should help preventing issues like #1019.
2016-12-30 00:06:51 -02:00
Marcelo Fabri a85a6c0fbf Fix adding LICENSE to portable_zip
Fixes #1083
2016-12-29 21:49:16 -02:00
JP Simard 7abbd847e3 fix 'pod trunk push' commands
must push one spec at a time, and if more than one exists,
must specify them by name.

Also include the 'LICENSE' file in the portable zip and let
SwiftLint.podspec know about it.
2016-12-18 18:23:09 -08:00
JP Simard a58419c0ed fix make publish 2016-12-18 16:53:31 -08:00
Marcelo Fabri f722f76575 Updates docker image to use Swift 3.0.2 2016-12-18 00:36:15 -02:00
JP Simard 0bdf6faf73 add make docker_test and run Linux tests on Travis 2016-12-11 14:04:49 -08:00
JP Simard 196dcdb628 add make publish
to publish to both CocoaPods trunk and Homebrew
2016-12-06 22:35:42 -08:00
JP Simard 14d01f84c7 add portable_zip step to make release 2016-12-06 22:35:23 -08:00
JP Simard b2c5e6c028 add make set_version 2016-12-06 22:09:51 -08:00
JP Simard f4827919aa add make get_version 2016-12-06 22:09:41 -08:00
JP Simard 950161de0a Speed up getting the version string 2016-12-06 22:09:13 -08:00
JP Simard 78284d2ad9 Merge pull request #669 from vokal/feature/portable-target
Add "portable_zip" target in Makefile
2016-06-07 10:49:53 -07:00
Norio Nomura 424d1c1472 Remove settings-for-all-projects.xcconfig and add flags into XCODEFLAGS in Makefile 2016-06-01 21:09:52 +09:00
Isaac Greenspan 4db36342c7 Add target to the Makefile for making a "portable" zip.
The zip contains the executable and the framework, with the executable modified to look for the framework in the same directory as the executable.
2016-05-17 18:15:26 -05:00
Norio Nomura c2eadaa922 [SPM] Run make spm_test on Travis-CI
`swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a` supports `SWIFT_EXEC` environment variable that points `swiftc` for building `*.swift`
2016-04-13 18:25:01 +09:00
Norio Nomura 5c0045e29a Add -configuration options to clean target in Makefile
`xcodebuild clean` uses `Debug` configuration without `-configuration`
option, and cleans directories that used by `Debug` configuration. But
`make install` uses `-configuration Release` by scheme of project.

By this change, `clean` cleans all directories that used by `Debug`,
`Release` and `Test` configurations.
2016-03-30 12:32:47 +09:00
Norio Nomura 55fce2c108 [SPM] Update Makefile to using swift test 2016-03-19 10:05:18 +09:00
Norio Nomura ee44cedadf [SPM] Update to swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a 2016-03-19 09:31:18 +09:00
Norio Nomura cf15800474 [SPM] Remove spm_bootstrap and spm_teardown from Makefile 2016-03-19 09:31:18 +09:00
Norio Nomura 4622bfbf47 Change to use spm_bootstrap and spm_teardown from SourceKitten 2016-02-09 16:58:18 +09:00
Norio Nomura 3f772059a7 Requiring no llbuild flags
Same approach as https://github.com/jpsim/SourceKitten/pull/168
2016-02-09 11:09:08 +09:00
JP Simard b43fde613b update YamlSwift to 1.4.2 2016-02-07 22:30:22 -08:00
Norio Nomura e78ddbf806 [SPM] Update to swift-DEVELOPMENT-SNAPSHOT-2016-02-03-a 2016-02-05 18:59:27 +09:00
Norio Nomura eab4329704 [SPM] Add make spm_test 2016-02-03 13:31:51 +09:00
Norio Nomura f4711623fd Add make swift_snapshot_install, spm, spm_clean & spm_clean_dist 2016-02-01 13:53:45 +09:00
toshi0383 3b913bebba Fix regex to grep compilation time output correctly
Now we can catch "10.0ms", but not "0.0ms".
2016-01-28 13:06:16 -08:00
Norio Nomura d193add338 Add test action to xcodebuild 2016-01-19 11:54:03 +09:00
Norio Nomura 954d2e2cf8 Add make display_compilation_time
#382
SeeAlso: http://irace.me/swift-profiling/
2016-01-19 09:36:54 +09:00
Norio Nomura 3e9a0b9b2d Fix Homebrew bottling error
`brew install --verbose --build-bottle swiftlint` failed by the error on https://github.com/Homebrew/homebrew/pull/47688

See also: https://github.com/realm/SwiftLint/pull/328#issuecomment-170214980
2016-01-13 09:41:39 +09:00