question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add an inspection for undefined attributes

See original GitHub issue

Rationale

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:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mojavelinuxcommented, Sep 16, 2021

I use a partial in the ROOT module to define component-wide shared attributes and settings. You are right, the playbook may be a better place to do this.

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.

0reactions
ahus1commented, Oct 6, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found