Skip to content

plugins/swiftlint: Add swiftlint plugin for linting swift

JCWasmx86 requested to merge JCWasmx86/gnome-builder:swiftlint into main

This is for upstreaming my SwiftLint plugin.

It is a draft, as it expects either /usr/lib/libsourcekitdInProc.so to exist, or that LINUX_SOURCEKIT_LIB_PATH is set with a path to this shared object.

For bundling, I did this: https://github.com/JCWasmx86/org.freedesktop.Sdk.Extension.swift, for putting Swift toolchain, linter, formatter into a flatpak SDK, comparable to e.g. the Vala one.

But for now, I see three possibilties:

  • Not merging for now, until e.g. flatpak extension points work is done
  • Just giving the user the responsibility for ensuring /usr/lib/libsourcekitdInProc.so exists, e.g. through symlinks
  • Querying certain paths and setting LINUX_SOURCEKIT_LIB_PATH, as e.g. Fedora places it in /usr/libexec/swift/$SWIFT_VERSION/lib/libsourcekitdInProc.so
Edited by JCWasmx86

Merge request reports