-
-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I have files structured in this way:
❯ tree -a
.
├── .DS_Store
├── .swiftplantuml.yml
├── also_ok
│ └── swift.swift
├── ok
│ └── swift.swift
└── unwanted
└── swift.swift
4 directories, 5 files
Each swif.swift file contains one protocol named after the directory.
Configuration file contains:
files:
include:
- ok
- also_ok
exclude:
- unwanted
Then swiftplantuml . --verbose
output is as follows:
14:03:28.543 💙 INFO ConfigurationProvider.readSwiftConfig():28 - search for config file in current directory with name '.swiftplantuml.yml'
14:03:28.546 💙 INFO ConfigurationProvider.readSwiftConfig():30 - .swiftplantuml.yml file found
14:03:28.546 💙 INFO ClassDiagram.run():65 - SDK: no SDK path provided
14:03:28.546 💙 INFO FileCollector.getFiles():24 - paths will be ignored in favor of configuration (files:include: also_ok, ok)
14:03:28.636 💚 DEBUG SyntaxStructureProvider.create():31 - read file:///{redacted}/unwanted/swift.swift in 0.08880603313446045
14:03:28.636 💚 DEBUG SyntaxStructureProvider.create():31 - read file:///{redacted}/also_ok/swift.swift in 0.0003809928894042969
14:03:28.637 💚 DEBUG SyntaxStructureProvider.create():31 - read file:///{redacted}/ok/swift.swift in 0.0004260540008544922
14:03:28.637 💚 DEBUG PlantUMLScript.init():60 - PlantUML script created in 1.5974044799804688e-05 seconds
14:03:28.637 💙 INFO ClassDiagramGenerator.logProcessingDuration():61 - Class diagram generated in 0.08993899822235107 seconds and will be presented now
It seems like the exclude
option is either not printed or totally ignored here:
14:03:28.546 💙 INFO FileCollector.getFiles():24 - paths will be ignored in favor of configuration (files:include: also_ok, ok)
and even though include
option is specified it still creates diagram for types found in unwanted
directory:
14:03:28.636 💚 DEBUG SyntaxStructureProvider.create():31 - read file:///{redacted}/unwanted/swift.swift in 0.08880603313446045
The same behaviour is for: swiftplantuml . --verbose --exclude unwanted
, without configuration file:
14:23:28.450 💙 INFO ConfigurationProvider.readSwiftConfig():28 - search for config file in current directory with name '.swiftplantuml.yml'
14:23:28.456 💙 INFO ConfigurationProvider.decodeYml():49 - cannot find/read yaml file
14:23:28.456 💙 INFO ConfigurationProvider.readSwiftConfig():33 - return default configuration
14:23:28.456 💙 INFO ClassDiagram.run():65 - SDK: no SDK path provided
14:23:28.551 💚 DEBUG SyntaxStructureProvider.create():31 - read file:///{redacted}/unwanted/swift.swift in 0.09683799743652344
14:23:28.552 💚 DEBUG SyntaxStructureProvider.create():31 - read file:///{redacted}/also_ok/swift.swift in 0.0007170438766479492
14:23:28.553 💚 DEBUG SyntaxStructureProvider.create():31 - read file:///{redacted}/ok/swift.swift in 0.0006769895553588867
14:23:28.553 💚 DEBUG PlantUMLScript.init():60 - PlantUML script created in 7.009506225585938e-05 seconds
14:23:28.553 💙 INFO ClassDiagramGenerator.logProcessingDuration():61 - Class diagram generated in 0.09848403930664062 seconds and will be presented now
In both cases, the graph is as follows:
@startuml
' STYLE START
hide empty members
skinparam shadowing false
' STYLE END
set namespaceSeparator none
class "Unwanted" as Unwanted << (P, GoldenRod) protocol >> {
}
class "AlsoOk" as AlsoOk << (P, GoldenRod) protocol >> {
}
class "Ok" as Ok << (P, GoldenRod) protocol >> {
}
@enduml
The expected output would be to not read files from unwanted
directory (regardless if it's specified in excluded or not), thus types defined there won't end up in the diagram.