-
-
Notifications
You must be signed in to change notification settings - Fork 25
Raise warnings for unused configuration keys #139
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
Raise warnings for unused configuration keys #139
Conversation
Reviewer's GuideExtends configuration validation to surface deprecation warnings for unused or legacy keys in both project-level and global configs, and removes an outdated comment from the plugin initializer. Sequence Diagram for MkDoxyConfig Validation and Warning AggregationsequenceDiagram
participant C as Caller
participant MC as MkDoxyConfig
participant SFC as SuperClassConfig
participant PSchema as ProjectSchemaItem
participant POT as ProjectOptionType
C->>+MC: validate()
MC->>+SFC: super().validate()
SFC-->>-MC: (failed_super, warnings_super)
MC->>MC: Calculate unused_keys for MkDoxyConfig
loop For each global unused legacy key k
MC->>MC: Add warning for k to warnings_super
end
Note over MC: warnings_super now contains global config warnings.
MC->>PSchema: Access 'projects' from self._schema
PSchema-->>MC: Project schema entry (s)
MC->>POT: Access s.option_type.warnings
Note over POT: These warnings are from validated MkDoxyConfigProject instances
POT-->>MC: project_warnings
MC->>MC: Extend own warnings with project_warnings
MC-->>-C: (final_failed, final_warnings)
Updated Class Diagram for MkDoxyConfig and MkDoxyConfigProjectclassDiagram
class Config {
+validate() : tuple
}
class MkDoxyConfigProject {
+validate() : tuple
}
class MkDoxyConfig {
+projects : list~MkDoxyConfigProject~
+validate() : tuple
}
Config <|-- MkDoxyConfigProject
Config <|-- MkDoxyConfig
MkDoxyConfig "1" o-- "*" MkDoxyConfigProject : has projects
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
@JakubAndrysek This should fix the missing warnings. It is now also raising a warning for |
@JakubAndrysek Hello, hope you are well. I just wanted to remind you of the existence of this PR |
Hi, sorry for the delay in finishing your PR. |
Raise warnings for unused configuration keys. Raise more explicit warnings for deprecated keys to help with migrating to v2.
Summary by Sourcery
Add deprecation warnings for unused and legacy configuration keys in both project and global validation, and propagate project-level warnings into the global validator
Enhancements:
Chores: