Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve superfluous_disable_command #387

Merged
merged 5 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
## Master

- Release Docker image with SwiftLint [@f-meloni][] - [#380](https://github.com/danger/swift/pull/3680)
- Add .swiftlint.yml [@417-72KI][] [#383](https://github.com/danger/swift/pull/383)
- Resolve `superfluous_disable_command` [@417-72KI][] [#387](https://github.com/danger/swift/pull/387)

## 3.6.1

Expand Down
10 changes: 5 additions & 5 deletions Sources/Danger/BitBucketCloud.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public struct BitBucketCloud: Decodable {
public let metadata: BitBucketMetadata

/// The PR metadata
public let pr: PullRequest // swiftlint:disable:this identifier_name
public let pr: PullRequest
}

extension BitBucketCloud {
Expand All @@ -33,7 +33,7 @@ extension BitBucketCloud {
case createdOn = "created_on"
case description
case destination
case id // swiftlint:disable:this identifier_name
case id
case participants
case reviewers
case source
Expand Down Expand Up @@ -71,7 +71,7 @@ extension BitBucketCloud {
public let destination: MergeRef

/// PR's ID
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

/// People who have participated in the PR
public let participants: [Participant]
Expand Down Expand Up @@ -204,7 +204,7 @@ extension BitBucketCloud {
case user
case updatedOn = "updated_on"
case type
case id // swiftlint:disable:this identifier_name
case id
case inline
}

Expand All @@ -217,7 +217,7 @@ extension BitBucketCloud {
/// Was the comment deleted?
public let deleted: Bool

public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

public let inline: Inline?

Expand Down
1 change: 0 additions & 1 deletion Sources/Danger/BitBucketServerDSL.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Foundation

// swiftlint:disable nesting
// swiftlint:disable identifier_name

public struct BitBucketServer: Decodable, Equatable {
enum CodingKeys: String, CodingKey {
Expand Down
24 changes: 12 additions & 12 deletions Sources/Danger/GitHubDSL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ extension GitHub {
/// A GitHub user account.
public struct User: Decodable, Equatable {
enum CodingKeys: String, CodingKey {
case id // swiftlint:disable:this identifier_name
case id
case login
case userType = "type"
}
Expand All @@ -201,7 +201,7 @@ extension GitHub {
}

/// The UUID for the user organization.
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

/// The handle for the user or organization.
public let login: String
Expand All @@ -215,7 +215,7 @@ extension GitHub {
/// A GitHub team.
public struct Team: Decodable, Equatable {
/// The UUID for the team.
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

/// The team name
public let name: String
Expand Down Expand Up @@ -256,7 +256,7 @@ extension GitHub {
extension GitHub {
public struct Repo: Decodable, Equatable {
enum CodingKeys: String, CodingKey {
case id // swiftlint:disable:this identifier_name
case id
case name
case owner
case description
Expand All @@ -267,7 +267,7 @@ extension GitHub {
}

/// Generic UUID.
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

/// The name of the repo, e.g. "danger-swift".
public let name: String
Expand Down Expand Up @@ -297,7 +297,7 @@ extension GitHub {
enum CodingKeys: String, CodingKey {
case body
case commitId = "commit_id"
case id // swiftlint:disable:this identifier_name
case id
case state
case submittedAt = "submitted_at"
case user
Expand All @@ -318,7 +318,7 @@ extension GitHub {
public let commitId: String?

/// The id for the review (if a review was made).
public let id: Int? // swiftlint:disable:this identifier_name
public let id: Int?

/// The state of the review (if a review was made).
public let state: State?
Expand Down Expand Up @@ -372,7 +372,7 @@ extension GitHub {
extension GitHub {
public struct Issue: Decodable, Equatable {
enum CodingKeys: String, CodingKey {
case id // swiftlint:disable:this identifier_name
case id
case number
case title
case user
Expand All @@ -397,7 +397,7 @@ extension GitHub {

public struct Label: Decodable, Equatable {
/// The id number of this label.
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

/// The URL that links to this label.
public let url: String
Expand All @@ -410,7 +410,7 @@ extension GitHub {
}

/// The id number of the issue
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

/// The number of the issue.
public let number: Int
Expand Down Expand Up @@ -465,7 +465,7 @@ extension GitHub {
case creator
case description
case dueOn = "due_on"
case id // swiftlint:disable:this identifier_name
case id
case number
case openIssues = "open_issues"
case state
Expand All @@ -480,7 +480,7 @@ extension GitHub {
}

/// The id number of this milestone
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int

/// The number of this milestone
public let number: Int
Expand Down
16 changes: 8 additions & 8 deletions Sources/Danger/GitLabDSL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension GitLab {
case createdAt = "created_at"
case description
case dueDate = "due_date"
case id // swiftlint:disable:this identifier_name
case id
case iid
case projectId = "project_id"
case startDate = "start_date"
Expand All @@ -51,7 +51,7 @@ extension GitLab {
public let createdAt: Date
public let description: String
public let dueDate: Date?
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int
public let iid: Int
public let projectId: Int
public let startDate: Date?
Expand Down Expand Up @@ -106,14 +106,14 @@ extension GitLab {
}

public enum CodingKeys: String, CodingKey {
case id // swiftlint:disable:this identifier_name
case id
case ref
case sha
case status
case webUrl = "web_url"
}

public let id: Int // swiftlint:disable:this identifier_name
public let id: Int
public let ref: String
public let sha: String
public let status: Status
Expand All @@ -135,7 +135,7 @@ extension GitLab {
case downvotes
case firstDeployedToProductionAt = "first_deployed_to_production_at"
case forceRemoveSourceBranch = "force_remove_source_branch"
case id // swiftlint:disable:this identifier_name
case id
case iid
case latestBuildStartedAt = "latest_build_started_at"
case latestBuildFinishedAt = "latest_build_finished_at"
Expand Down Expand Up @@ -178,7 +178,7 @@ extension GitLab {
public let downvotes: Int
public let firstDeployedToProductionAt: Date?
public let forceRemoveSourceBranch: Bool
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int
public let iid: Int
public let latestBuildFinishedAt: Date?
public let latestBuildStartedAt: Date?
Expand Down Expand Up @@ -217,7 +217,7 @@ extension GitLab {
public struct User: Decodable, Equatable {
public enum CodingKeys: String, CodingKey {
case avatarUrl = "avatar_url"
case id // swiftlint:disable:this identifier_name
case id
case name
case state
case username
Expand All @@ -230,7 +230,7 @@ extension GitLab {
}

public let avatarUrl: String?
public let id: Int // swiftlint:disable:this identifier_name
public let id: Int
public let name: String
public let state: State
public let username: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swiftlint:disable line_length file_length
// swiftlint:disable file_length

public let DSLBitBucketCloudJSON = """
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// swiftlint:disable line_length

public let DSLGitLabJSON = """
{
"danger": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// swiftlint:disable line_length

public let DSLGitLabMilestoneNoDateRangeJSON = """
{
"danger": {
Expand Down
1 change: 0 additions & 1 deletion Sources/Runner/Commands/Runner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ func runDanger(logger: Logger) throws {
let generator = DangerFileGenerator()
try generator.generateDangerFile(fromContent: importsOnly, fileName: tempDangerfilePath, logger: logger)

// swiftlint:disable line_length
// Example commands:
//
//
Expand Down