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
Summary:
**Changes occurred only for the IGListCollectionViewLayout.**
**Specifically:**
1. Harnessed the hardcore to the fact that it is possible to use only headers.
2. Assertions removed
3. Caching for layout of attributes of footers
4. Implemented the location of the footers in any orientation scroll
Issue fixed: #898
I need this enhancement ASAP 🙏
**Example:**
Footers with user comments count

- [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)
- [x] I updated example project with implemented feature
Closes https://github.com/Instagram/IGListKit/pull/1017
Reviewed By: jeremycohen
Differential Revision: D6385893
Pulled By: rnystrom
fbshipit-source-id: 5f1bad5655d2df321f8c71496aa797ac8e3d226a
Summary:
Used migration tool with Swift 4, fixed build errors, and killed all warnings. Only non-trivial change was in the macOS example. Will flag that one.
No changelog needed for this, right?
- [x] All tests pass. Demo project builds and runs.
Closes https://github.com/Instagram/IGListKit/pull/941
Differential Revision: D5890505
Pulled By: rnystrom
fbshipit-source-id: 7e0d3510ff0e5856a0ffd59f1a97548a72266c20
Summary:

Noticed an issue when trying to build the examples project that I couldn't because of the Swiftlint build phase (see the image above)
As it turns out in between the version I have installed (0.16.1) and the latest (0.19.0) they've made it so you can drop `lint` from the command (which is the default task).
I see two options really:
1. We add `lint` to the command which at least lets older versions of Swiftlint compile the project without making changes to run phases. It's worth noting that this means that certain (newer) rules won't be detected.
2. We add a way of detecting if they have an older version (likely by comparing the output of `$(swiftlint version)` to the version we know it works on. And display a more appropriate message and not fail the build.
Happy to discuss this
heshamsalman jessesquires rnystrom
Closes https://github.com/Instagram/IGListKit/pull/796
Differential Revision: D5137557
Pulled By: rnystrom
fbshipit-source-id: b6c85197d7a66e37976d66b646c9c9241827ce42
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
Summary:
~~Land after #661, #730 and D5031184~~
Rebuild the docs from script. Couple notes:
- Went from 100% to 99%, does that matter? Script output says
- > 99% documentation coverage with 2 undocumented symbols
- Looks like `NS_SWIFT_NAME` throws documentation for a loop on `IGListDiffOption` and `IGListExperiment`
- Swift names are different, will that be a problem?
Part of #707
Closes https://github.com/Instagram/IGListKit/pull/728
Differential Revision: D5050951
Pulled By: jessesquires
fbshipit-source-id: 19249c1d34e6f253b911965114fd4ae7458d2684
Summary:
These tests are timing out all the time. ☠️
Issue fixed: #683
Closes https://github.com/Instagram/IGListKit/pull/688
Differential Revision: D4965525
Pulled By: rnystrom
fbshipit-source-id: ea122e66379646c557d1b8f1c7325894620b88fb
Summary:
Issue fixed: #630
- [x] 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/631
Differential Revision: D4860116
Pulled By: jessesquires
fbshipit-source-id: 8138b50106ae06e06c643ba74451c511f38b0b98
Summary:
Created a new demo that shows off how to:
- Inject dependencies to section controllers
- Objects shared between section controllers
- Things that aren't the core "object"
- Announce changes from the VC that make their way to the section controllers
- Without calling updates
Closes https://github.com/Instagram/IGListKit/pull/612
Differential Revision: D4827188
Pulled By: rnystrom
fbshipit-source-id: 9575df0e105fd06f9a59db49432b19e8b824e0e3
Summary:
Started work on the plane to get this moving since #418 is up and ready to land. We'll likely need to spend some time fleshing out the API of this, and I think I'll split it up into a couple different PRs once ready for review. Putting this up now to get early feedback.
This adds an auto-diffing section controller as outlined in #38. There are several key parts:
- Subclass a new section controller `IGListAutoSectionController` (naming wip)
- Connect a data source
- Implement the data source methods that do 3 things:
- Given a top-level object, transform it into an array of **diffable** view models
- Given a view model, return a cell
- Given a view model, return a size for a cell
- A new protocol for the cell `IGListBindable` so that we can control when the cell is updated w/ the view model.
- The most important part of this is that it unlocks moving and reloading a cell, which you can't do w/ `UICollectionView`
- [ ] Unit test `reloadObjects:`
- [x] Add
Closes https://github.com/Instagram/IGListKit/pull/494
Reviewed By: amonshiz
Differential Revision: D4696966
Pulled By: rnystrom
fbshipit-source-id: f21b8341b3ed4389f2a4a106d0d316f481ba6943
Summary:
Adding a pretty basic stacked demo. 3 different sections, each with 3 child section controllers that handle an `Int` data.
Requires #354 to be fully functional (working range).
Closes#134
- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/355
Differential Revision: D4363859
Pulled By: jessesquires
fbshipit-source-id: 5dbc8e18388fed4930f189e3477ff57f0edf2d13
Summary:
Add basic UI Testing to Examples-iOS app.
It doesn't cover all the examples yet, but Xcode is reporting ~82% of coverage.
Updated travis.yml to run the UI Tests for only one of the matrix jobs - "OS=10.0,name=iPhone 6s", to try to keep the build times acceptable. Last job took ~3 min for the UI Testing section (being the whole build usually around 40 min).
Was feeling like playing a bit with UI Testing and took the chance to use it here, since rnystrom [showed interest in having it](https://github.com/Instagram/IGListKit/pull/251#issuecomment-262375087).
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/268
Differential Revision: D4259177
Pulled By: jessesquires
fbshipit-source-id: 77fdaf8588e090e4b13836a127d9f6d838248163