Open jflan-dd opened 4 weeks ago
Not at this time. However, I am open to suggestions on how we might be able to support this.
Maybe we could take inspiration from Swiftlint's extra_rules
setup: https://github.com/jpsim/swiftlint-bazel-example
Add a step in here somewhere that defaults to an empty implementation, but could be overridden similarly to Swiftlint. https://github.com/cgrindel/rules_swift_package_manager/blob/44f29685a2957a86a0412a1eef71ff61244ea3fb/gazelle/generate.go#L84-L97
Related: Could I use this section to accomplish what I need?
// If the name is specified by a directive, short cirucit and return that:
sc := swiftcfg.GetSwiftConfig(args.Config)
Could I use this section to accomplish what I need?
I think that it will. I forgot that we had that directive. There are examples of the swift_default_module_name directive in the repo. Here is one:
# gazelle:swift_default_module_name SnapkitExample
It it feasible to customize the behavior of gazelle when generating local BUILD files?
In our project we define different "layers" which are reflected in the folder structure on disk. So for example there's a
Networking
folder, which contains lots of individual packages and our current tooling automatically appends "Networking" to the end of the package name. So for the code inLayers/Networking/Address/Sources
will create a package named "AddressNetworking".Are there any customization points to replicate this logic for the
update_build_files
command?