Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Kladek committed Jun 9, 2017
1 parent 49ff012 commit 04e3a23
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Binary file added Documentation/Callisto Workflow Image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# Callisto
[![Twitter: @PatrickKladek](https://img.shields.io/badge/twitter-@PatrickKladek-orange.svg?style=flat)](https://twitter.com/PatrickKladek)
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/IdeasOnCanvas/Callisto/master/LICENSE)
![alt text](https://img.shields.io/badge/Platform-Mac%2010.12+-blue.svg "Target Mac")


![Logo](file:///Users/patrick/Desktop/Callisto Workflow Image.png "Logo")

If you enabled the clang static analyzer in your xcode project you might notice that your build time nearly doubled. One way to deal with this issue, is to run the static analyzer on your server (buildkite) but there is no built in way to post the results to slack. So we build Callisto. We use Callisto with fastlane so we first must pipe the fastlane output to a temp-file. After that we call Callisto to parse the fastlane file and post the results back to slack.

```
#!/bin/bash
fastlane ios staticAnalyze 2>&1 | tee /tmp/fastlane_iOS_Output.txt
Callisto -fastlane "/tmp/fastlane_iOS_Output.txt" \
-slack "<SLACK_WEBHOOK_URL>" \
-branch "$BUILDKITE_BRANCH" \
-githubUsername "<GITHUB_USERNAME>" \
-githubToken "<GITHUB_TOKEN>" \
-githubOrganisation "<GITHUB_ORGANISATION>" \
-githubRepository "<GITHUB_REPOSITORY>" \
-ignore "todo, -Wpragma"
```

### Parameter
* -slack: create a slack webhook url and pass as parameter to Callisto
* -branch: when using buildKite you can simply pass the envirmonment variable "$BUILDKITE_BRANCH"
* -githubUsername: Callisto needs access to the github resolve the branch to the associated pull request.
* -githubToken: instead of using your github password create a token from your account and only allow read access to the repository. This way is recomended by GitHub.
* -githubOrganisation: this parameter is used to create the correct url for communicating with guthub.
* -githubRepository: this parameter is used to create the correct url for communicating with guthub.
* -ignore: pass keywords which should be excluded from your slack report. We use "todo & -Wpragma" since we know they are in our code but we don't want to be messaged about it by every push.

### How does it work
Callisto simply parses the output from fastlane which mostly pipes through the clang messages from the compiler. By filtering this messages and reformatting them Callisto is able to post them to slack. When you enable GitHub checks you can also merge blocking if Callisto finds an analyzer Message so you are forced to fix it before merging your branch.



Parse Clang Static Analyzer messages and pass them to Slack

0 comments on commit 04e3a23

Please sign in to comment.