jqa-core-framework icon indicating copy to clipboard operation
jqa-core-framework copied to clipboard

adoc files do not evaluate include directives in source blocks

Open ascheman opened this issue 4 years ago • 0 comments

Bug Description

Referring to communications with @DirkMahler: https://groups.google.com/g/jqassistant/c/llJ2QR4Wasw/m/IM_aJGsIBAAJ

If I have an AsciiDoctor based concept with a source block like the following:

[source,cypher,role=concept]
----
include::my-rule1.cyp[]
-----

I would expect, that the cypher block from the included file would be evaluated.

Instead, it leads to an error since the include seems to be evaluated literally instead of semantically:

[INFO] Executing group 'default'
[INFO] Applying concept 'my-rules:MyRule1' with severity: 'MINOR'.
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time:  16.945 s
[INFO] Finished at: 2021-03-01T17:46:45+01:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
com.buschmais.jqassistant:jqassistant-maven-plugin:1.10.0-SNAPSHOT:analyze
(cli-default) on project jqa: Analysis failed.: Cannot execute query
for rule 'Concept{id='my-rules:MyRule1, description='',
ruleSource=.../jqassistant/my-rules.adoc}'. Unexpected end of input:
expected whitespace, CYPHER options, EXPLAIN, PROFILE or Query (line
1, column 1 (offset: 0))
[ERROR] ""
[ERROR]  ^

Expected Behaviour

Please evaluate the include directive.

Your Environment

Remove this hint: Some bugs are releated to the environment jQAssitant is running in. Please help us to find out, if the problem is only related to the crappy code we have written or to the environment.

  • JDK: openjdk version "1.8.0_265"
  • OS: OSX 10.14

Definition of Done for the Implementers

Remove this hint: these checkboxes can be checked like this: [x]

  • [x] We got a final feedback from the reporting user (if applicable)
  • [ ] Unittests have been written (if applicable)
  • [x] Integration tests have been written (if applicable)
  • [ ] Test coverage is the same or even better then before (if applicable)
  • [ ] Documentation has been written (if applicable)
  • [x] Added a note on the new feature to the release notes (if applicable)

ascheman avatar Mar 03 '21 07:03 ascheman