Commit graph

8 commits

Author SHA1 Message Date
Jesse Squires
8dd464e712 Update swiftlint + script, add newrules, autocorrect
Summary:
- Updates to SwiftLint 0.24.2
- Improve `scripts/lint.sh`
    - pull version out to a var for easier maintenance
    - better error message
    - make script fail xcode build if not installed (so we don't commit lint errors)
- Adds a few new SwiftLint rules
- Correct all new lint errors (most can be done by running `swiftlint autocorrect`)
- Cleans up `.swiftlint.yml`
- Fix up example projects
Closes https://github.com/Instagram/IGListKit/pull/1058

Differential Revision: D6776177

Pulled By: rnystrom

fbshipit-source-id: 345172237b97aaed0d62312c8f366f46145f8cd9
2018-01-22 12:14:38 -08:00
Jesse Squires
ae7f36f5c2 Update gems, fix warnings, pod install
Summary:
- Update CocoaPods + Gems
- Update SwiftLint version
- Fix lint errors
- Fix `pod_setup.sh` script, move to `scripts/` (should now be run from root dir)
- Run `pod_setup.sh`
Closes https://github.com/Instagram/IGListKit/pull/1038

Differential Revision: D6602297

Pulled By: rnystrom

fbshipit-source-id: 1bf69611e041903cf982fe7d9a95197729e44d94
2017-12-19 09:31:37 -08:00
heshamsalman
02f28fc994 Implemented SwiftLint, new PR
Summary:
Replaces #642, #681

Issue ref: #394

Changes from last PR:
- Deleted the shared SwiftLint folder, incl. all files (On the plus side, did this in the quest to get this PR in https://github.com/realm/SwiftLint/pull/1513)
- Changed the build script such that it runs the user's `HomeBrew` installation of SwiftLint instead of the local copy

Integrates SwiftLint into DangerBot.
You may want to append a ?w=1 to the end of the files-changed url to exclude whitespace-only changes.

- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/741

Differential Revision: D5068134

Pulled By: jessesquires

fbshipit-source-id: 68d6a57e0072672e38eeb94908d00f26bbd68fbc
2017-05-16 07:31:43 -07:00
Robert Payne
40625f8ff9 Swift name annotations
Summary:
This adds `NS_SWIFT_NAME` annotations to all public API's to provide cleaner integration into Swift:

- Removes the need to prefix classes in Swift code, instead rely on Swift module name spacing
- Adds more argument labels to C function API's like `IGListDiff([], [], .equality)` => `ListDiff(oldArray: [], newArray: [], option: .equality)`

While this is a large API change it should be as easy as:

- Find and replace `(IGList)([^K])` to `List$2` in Xcode with a scope set to Swift
- Build and follow compiler's auto fix corrections for C API's or any missed renames

I have not updated the documentation to reflect this yet, I am totally willing to do so but before I sink that amount of time into it I wanted to see if the Instagram team is even open to this change!

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
- [ ] I have updated the documentation
Closes https://github.com/Instagram/IGListKit/pull/593

Reviewed By: jessesquires

Differential Revision: D5028039

Pulled By: rnystrom

fbshipit-source-id: b473d874a1f9574e56b2ebaabd5b73d1b57d4bab
2017-05-09 14:31:28 -07:00
Ryan Nystrom
3102852ce2 Remove IGListSectionType
Summary:
Removing the `IGListSectionType` protocol and adding default implementations into `IGListSectionController`.

- `numberOfItems` returns 1
- `cellForItemAtIndex:` asserts (have to return a cell)
- `didUpdateToObject:` no-ops
- `didSelectItemAtIndex:` no-ops

Fixes #168

Reviewed By: jessesquires

Differential Revision: D4909585

fbshipit-source-id: 8816702504e3fc0683868914ff4dd20e4af7c166
2017-04-19 08:26:30 -07:00
heshamsalman
6758355f0c Chore/variable accessibility, close #618
Summary:
Issue fixed: #618

- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/637

Differential Revision: D4869624

Pulled By: jessesquires

fbshipit-source-id: a9d5623dbb7a032691f3af5a2abf61adc3a42cd0
2017-04-11 13:46:41 -07:00
Bofei Zhu
1d3e58b9fd Create a grid layout for IGList
Summary:
Rebase from #140:

Create a flow layout for IGList that does not newline sections. Closes #3

- [x] Minimum inter-item spacing
- [x] Minimum line spacing
- [x] Constant item size with constant layout time
- [x] Update layout on insert/delete/move
- [x] Unit Test
Closes https://github.com/Instagram/IGListKit/pull/225

Differential Revision: D4211469

Pulled By: rnystrom

fbshipit-source-id: f4710dbf195701098ac50f94b6b2aa8c801b2a83
2016-11-21 13:29:04 -08:00
Jesse Squires
879260b417 internal diff for PR #209
Summary: https://github.com/Instagram/IGListKit/pull/209

Reviewed By: rnystrom

Differential Revision: D4190633

fbshipit-source-id: 9d382b9ba3f3d20c8b9c48d900650ec354bc9728
2016-11-16 12:44:19 -08:00
Renamed from Example/IGListKitExamples/SectionControllers/StoryboardLabelSectionController.swift (Browse further)