Crawler crash when Application.yaml contains Maven Vars
mousDZ opened this issue · 2 comments
mousDZ commented
Summary
Crawler crash when repo crawled has a Application.yaml which contains Maven Vars like :
"@project.artifactId@"
Type of Issue
It is a :
- [X ] bug
- request
- question regarding the documentation
Current Behavior
I use github-Crawler for extract zipkin-url from application.yml
my crawler config :
indicatorsToFetchByFile:
"[src/main/resources/application.yml]":
- name: zipkin_url
method: findPropertyValueInYamlFile
params:
propertyName: spring.zipkin.base-url
Steps to Reproduce (for bugs)
launch gihub-grawler with my config
vincent-fuchs commented
can you add the relevant part of the stacktrace showing the error please ?
vincent-fuchs commented
I was able to reproduce, this is the stacktrace :
while scanning for the next token
found character '@' that cannot start any token. (Do not use @ for indentation)
in 'reader', line 3, column 14:
maven.value: @project.artifactId@
^
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:421)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
The problem comes from the file itself :
instead of :
maven.value: @project.artifactId@
it should be :
maven.value: "@project.artifactId@"
see https://stackoverflow.com/questions/19109912/do-i-need-quotes-for-strings-in-yaml