-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes file extensions configurable (#8)
* Allow user to specify file extensions to check * Improve code style violation message and refactor its generation * Adds code style violation message verification * Adds .clang-format to make diffs produced in tests deterministic * Updates specs to fix #9 * Install clang-format-3.8 also on Linux
- Loading branch information
1 parent
a9dc5f4
commit 5c250d9
Showing
6 changed files
with
114 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BasedOnStyle: LLVM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ branches: | |
addons: | ||
apt: | ||
packages: [ | ||
clang-format-3.6 | ||
clang-format-3.8 | ||
] | ||
|
||
before_install: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
### Code Style Check | ||
--- | ||
Code style violations detected in the following files: | ||
* `spec/fixtures/BadViewController.m` | ||
|
||
Execute one of the following actions and commit again: | ||
1. Run `clang-format` on the offending files | ||
2. Apply the suggested patches with `git apply patch`. | ||
|
||
#### spec/fixtures/BadViewController.m | ||
```diff | ||
--- spec/fixtures/BadViewController.m | ||
+++ spec/fixtures/BadViewController.m | ||
@@ -1,9 +1,10 @@ | ||
-@interface ViewController ( ) @end | ||
+@interface ViewController () | ||
+@end | ||
|
||
@implementation ViewController | ||
--(void ) viewDidLoad { | ||
- [super viewDidLoad]; | ||
- NSLog( @"perfect change!") ; | ||
+- (void)viewDidLoad { | ||
+ [super viewDidLoad]; | ||
+ NSLog(@"perfect change!"); | ||
} | ||
|
||
@end | ||
|
||
``` |