Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-248

Enable Swiftlint on Tests/ and fix resulting linter issues

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.0.8
    • None

    Description

      Currently, we ignore the Tests/ directory as part of our .swiftlint.yml.

      Since linting helps us write code anywhere, it would be nice if we could enable Swiftlint on the Tests/ directory and clean up the code inside.

      Unfortunately, there are quite a few violations (Done linting! Found 109 violations, 9 serious in 21 files.), but as with most linter issues, these are all pretty small things and shouldn't be difficult to clean up. It may however, take some time to clean all of them, so I've marked this as a medium sized ticket.

      Some warnings from the linter shouldn't really apply to the Tests/ directory and its sources, for example, force unwraps. We should get around this by disabling such rules in a local .swiftlint.yml file within the Tests/ directory that takes precedence over the project root-level file.

      Attachments

        Activity

          People

            may.hoque@mongodb.com May Hoque
            may.hoque@mongodb.com May Hoque
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: