Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to specify the proper active directory to docs #5260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,36 @@ unacceptable behavior to [[email protected]](mailto:[email protected]).
brew install swiftlint
```

Afterwords ensure that xcode has the active developer directory set to
point where the Swift toolchain is located.

This is the default active directory but it does not have the Swift toolchain:

```
$ xcode-select -p
/Library/Developer/CommandLineTools
```

Use this command to specify the default active directory that includes
the Swift toolchain:

```
❯ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Password:
❯ xcode-select -p
/Applications/Xcode.app/Contents/Developer
```

Afterwards, `swiftlint` with default analyze command will work:

```
> swiftlint
.... <lines trucated>
empty line; currently 4 (vertical_whitespace)
Done linting! Found 897 violations, 10 serious in 39 files.
```


### Using [CocoaPods](https://cocoapods.org):

Simply add the following line to your Podfile:
Expand Down