-
Notifications
You must be signed in to change notification settings - Fork 6
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
Library doesn't detect syntax issues in conf files. #102
Comments
@yaroslav-nakonechnikov I think it's an expected behavior for this particular library. I believe it does not check for incorrect SPL syntax in values. You might try using |
btool is too heavy to run. and it also skips a lot of syntax issues. also noticed: when it parses, it also trims lines. Which is fine, if there will be need to store file. |
do you mind sharing an example of such behavior? I can ask around but I never saw a library/tool to parse and validate .conf files. |
sorry for late response. example is quite easy: conf file is being created locally, without splunk installed. as well for ci pipelines, using splunk is heavy and consumes resources (time, cpu, storage, network) and moreover - splunk containers are not consistent. we were trying to use as recent versions as possible, but from version to version - it breaks. Never was related to btool tool, but still not comfortable to see how new version breaks working setup. |
so, i managed to run btool without splunk itself... binary looks working, but still - it has too many dependencies like SPLUNK_HOME just to start. and then i put file in $SPLUNK_HOME/etc/system/local/savedsearches.conf
so, still, library does it better even in current version. |
thanks @yaroslav-nakonechnikov, your points are valid. I did some homework and I see that VSCode extension for Splunk (https://github.com/splunk/vscode-extension-splunk) offers some syntax highlighting and linting capabilities, let us explore it next week. There are also some other extensions that offer similar functionality. If that would be easy to incorporate into this library (or maybe another one) - I think we can go with it. |
Hello,
with help of this library i've created simple script to validate conf files:
and in that script when file has syntax error - it thinks that all good.
example:
as you see, empty space is there, but it should be wiped.
and it passes wrong multine search:
The text was updated successfully, but these errors were encountered: