Skip to content

Commit

Permalink
[CONTRIBUTING] Add building & running tips (#3360)
Browse files Browse the repository at this point in the history
* [CONTRIBUTING] Add building & running tips

* fixup! [CONTRIBUTING] Add building & running tips
  • Loading branch information
jpsim authored Sep 22, 2020
1 parent ea06b79 commit 774267c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,33 @@ _If you have commit access to SwiftLint and believe your change to be trivial
and not worth waiting for review, you may open a pull request and merge
immediately, but this should be the exception, not the norm._

### Building And Running Locally

#### Using Xcode

1. `git clone https://github.com/realm/SwiftLint.git`
1. `cd SwiftLint`
1. `xed .`
1. Select the "swiftlint" scheme
1. `cmd-opt-r` open the scheme options
1. Set the "Arguments Passed On Launch" you want in the "Arguments" tab
1. Set the "Working Directory" you want in the "Options" tab
1. Hit "Run"

|Arguments|Options|
|-|-|
|![image](https://user-images.githubusercontent.com/474794/93893073-1676b000-fca2-11ea-9428-20423c5f5237.png)|![image](https://user-images.githubusercontent.com/474794/93893135-27bfbc80-fca2-11ea-805a-ee21b446c3f0.png)|

Then you can use the full power of Xcode/LLDB/Instruments to develop and debug your changes to SwiftLint.

#### Using the command line

1. `git clone https://github.com/realm/SwiftLint.git`
1. `cd SwiftLint`
1. `swift build [-c release]`
1. Use the produced `swiftlint` binary from the command line, either by running `swift run [-c release] [swiftlint] [arguments]` or by invoking the binary directly at `.build/[release|debug]/swiftlint`
1. [Optional] Attach LLDB: `lldb -- .build/[release|debug]/swiftlint [arguments]`

### Submodules

This SwiftLint repository uses submodules for its dependencies.
Expand Down

0 comments on commit 774267c

Please sign in to comment.