Add an inspection for undefined attributes
See original GitHub issueRationale
Add an inspection for undefined attributes. This will improve the quality of documentation by, e.g.:
- identifying typos in attributes,
- accidentally using attributes where the curly brace should be escaped, e.g. in
API call /users/{id}.
Having an inspection allows to configure the severity level, and to ignore specific instances by annotations.
The feature complements the ability to generally treat warnings as errors (see https://github.com/asciidoctor/asciidoctor-intellij-plugin/issues/857) by handling this well-defined case explicitly. See also the related discussion on Zulip.
Proposed behavior
- Use an undefined attribute in an AsciiDoc file.
- The plugin currently does not detect this.
- With the new inspection, there will be an entry in the list of problems for the corresponding file/line in the source.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
undefined methods and properties vs class with __call and ...
Inspection improvement: undefined methods and properties vs class with __call and __get magic methods should have lesser severity (i.e. INFO) ; Project, PhpStorm....
Read more >Solved: Add Inspection/Related Record: Bring Value from F...
I've set up this kind of thing in Pro using GDB attribute rules but the same approach should work with a calculated expression...
Read more >util.inspect() ing a Proxy [sometimes] shows defined properties ...
get() method. This leads to util.inspect showing seemingly undefined values that, when referenced directly, are actually defined ... > x = new ...
Read more >A Python "catch all" method for undefined/unimplemented ...
I found a good solution. At the top of my file, I import inspect . Then I replace your line, if not hasattr(self,...
Read more >Code Inspection: Missing required attribute - Help | PhpStorm
Code Inspection: Missing required attribute ... Reports XML/HTML tags with missing mandatory attributes.You can specify attribute names that should not be ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Also consider that you can set attributes in antora.yml. That’s usually better than putting them in the playbook because they stay with the content. It’s the closest thing to a shared attributes file.
When I’m writing this, release 0.35.4 is the current release. This rule is enabled by default, and so far I haven’t heard complaints about too many false positive warnings, for example when people use internal, pre-defined attributes.
I now close this issue.