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

Remove parser warning coming from redundant backticks

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Unknown
    • Resolution: Gone away
    • None
    • None
    • None

    Description

      When running `swiftlint --autocorrect` in the driver, we get a bunch of diagnostic output (below) with warnings that we cannot fix because swift 5.1.5 requires backticks in argument lists while the newer swift versions generate a warning if you have redundant backticks.

      It would be good to find a way to suppress these warnings until we are able to remove support for swift 5.1.5  

      The backticks it warns about are introduced here: https://github.com/mongodb/mongo-swift-driver/pull/715/files 

      {{{}}
      {{ "diagnostics" : [}}
      {{ {}}
      {{ "key.column" : 13,}}
      {{ "key.description" : "keyword 'let' does not need to be escaped in argument list",}}
      {{ "key.diagnostic_stage" : "source.diagnostic.stage.swift.parse",}}
      {{ "key.filepath" : "\/Users\/nellie.spektor\/swift\/driver\/Sources\/MongoSwift\/MongoCollection+FindAndModify.swift",}}
      {{ "key.fixits" : [}}
      {{ {}}
      {{ "key.length" : 1,}}
      {{ "key.offset" : 10544,}}
      {{ "key.sourcetext" : ""}}
      {{ },}}
      {{ {}}
      {{ "key.length" : 1,}}
      {{ "key.offset" : 10548,}}
      {{ "key.sourcetext" : ""}}
      {{ }}}
      {{ ],}}
      {{ "key.line" : 214,}}
      {{ "key.severity" : "source.diagnostic.severity.warning"}}
      {{ },}}
      {{ {}}
      {{ "key.column" : 13,}}
      {{ "key.description" : "keyword 'let' does not need to be escaped in argument list",}}
      {{ "key.diagnostic_stage" : "source.diagnostic.stage.swift.parse",}}
      {{ "key.filepath" : "\/Users\/nellie.spektor\/swift\/driver\/Sources\/MongoSwift\/MongoCollection+FindAndModify.swift",}}
      {{ "key.fixits" : [}}
      {{ {}}
      {{ "key.length" : 1,}}
      {{ "key.offset" : 13099,}}
      {{ "key.sourcetext" : ""}}
      {{ },}}
      {{ {}}
      {{ "key.length" : 1,}}
      {{ "key.offset" : 13103,}}
      {{ "key.sourcetext" : ""}}
      {{ }}}
      {{ ],}}
      {{ "key.line" : 282,}}
      {{ "key.severity" : "source.diagnostic.severity.warning"}}
      {{ },}}
      {{ {}}
      {{ "key.column" : 13,}}
      {{ "key.description" : "keyword 'let' does not need to be escaped in argument list",}}
      {{ "key.diagnostic_stage" : "source.diagnostic.stage.swift.parse",}}
      {{ "key.filepath" : "\/Users\/nellie.spektor\/swift\/driver\/Sources\/MongoSwift\/MongoCollection+FindAndModify.swift",}}
      {{ "key.fixits" : [}}
      {{ {}}
      {{ "key.length" : 1,}}
      {{ "key.offset" : 16144,}}
      {{ "key.sourcetext" : ""}}
      {{ },}}
      {{ {}}
      {{ "key.length" : 1,}}
      {{ "key.offset" : 16148,}}
      {{ "key.sourcetext" : ""}}
      {{ }}}
      {{ ],}}
      {{ "key.line" : 361,}}
      {{ "key.severity" : "source.diagnostic.severity.warning"}}
      {{ }}}
      {{ ]}}
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nellie.spektor@mongodb.com Nellie Spektor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: