drep/languages/definitions/
swift.rs1use crate::languages::spec::{
4 DEFAULT_TOOL_TIMEOUT_SECS, DiagnosticsStream, LanguageSupport, OutputFormat, ToolSpec,
5};
6
7pub static SWIFTLINT: ToolSpec = ToolSpec {
14 name: "swiftlint",
15 command: &["swiftlint", "lint", "--reporter", "sarif", "--quiet"],
16 local_paths: &[],
17 config_files: &[".swiftlint.yml"],
18 config_flag: None,
19 output_format: OutputFormat::Sarif,
20 diagnostics_stream: DiagnosticsStream::Stdout,
21 timeout_secs: DEFAULT_TOOL_TIMEOUT_SECS,
22 timeout_context: None,
23 establishes_compilation: false,
24 serial_in_repository: false,
25 accepts_files: true,
26 reads_other_sources: true,
27};
28
29pub static SWIFT: LanguageSupport = LanguageSupport {
31 name: "swift",
32 display_name: "Swift",
33 extensions: &[".swift"],
34 filenames: &[],
35 filename_prefixes: &[],
36 tools: &[&SWIFTLINT],
37 conventions: &[
38 "Force unwraps and force tries on values that can be nil or throw",
39 "Retain cycles from closures capturing self strongly",
40 "Unowned references that outlive their target",
41 "Main-actor isolation violated from a synchronous context",
42 ],
43 vendored_dirs: &[".build", "Pods", "DerivedData"],
44};
45
46pub(crate) static FAMILY: &[&LanguageSupport] = &[&SWIFT];