         guard let commaIndex = trailingCommaIndex(contents: contentsAfterLastElement, file: file,
                                                   offset: lastPosition) else {
             guard configuration.mandatoryComma else {
-                return []
+                return nil
             }
 
-            return violations(file: file, byteOffset: lastPosition, reason: missingTrailingCommaReason)
+            return (lastPosition, missingTrailingCommaReason)
         }
 
         // trailing comma is present, which is a violation if mandatoryComma is false
         guard !configuration.mandatoryComma else {
-            return []
+            return nil
         }
 
         let violationOffset = lastPosition + commaIndex
-        return violations(file: file, byteOffset: violationOffset, reason: extraTrailingCommaReason)
+        return (violationOffset, extraTrailingCommaReason)
     }
 
     private func violations(file: File, byteOffset: Int, reason: String) -> [StyleViolation] {

            let (endLine, _) = contents.lineAndCharacter(forByteOffset: lastPosition),
            configuration.mandatoryComma && startLine == endLine {
            // shouldn't trigger if mandatory comma style and is a single-line declaration
            return []
        }

        let length = bodyLength + bodyOffset - lastPosition

        }

        guard let lastPosition = endPositions.max(), bodyLength + bodyOffset >= lastPosition else {
            return nil
        }

        let contents = file.contents.bridge()
