Skip to content
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

sqflint.ignoredVariables with * issue #90

Open
iAcolyte opened this issue Jan 24, 2021 · 1 comment
Open

sqflint.ignoredVariables with * issue #90

iAcolyte opened this issue Jan 24, 2021 · 1 comment
Labels

Comments

@iAcolyte
Copy link

iAcolyte commented Jan 24, 2021

изображение

It works fine without a '*' symbol. I tried to do something by myself, but it's too strong wizardy for me

problem placed somewhere in Options.java at line 424

@iAcolyte iAcolyte reopened this Jan 24, 2021
@iAcolyte
Copy link
Author

iAcolyte commented Jan 25, 2021

I probably fixed it with

if (skipped.indexOf('*')==0 && skipped.lastIndexOf('*')==skipped.length()-1){
	return name.contains(skipped.subSequence(1, skipped.length()-1));
}
if (skipped.indexOf('*')==skipped.length()-1){
	return name.startsWith(skipped.substring(0, skipped.length()-1));
}
if (skipped.indexOf('*')==0){
	return name.endsWith(skipped.substring(1, skipped.length()));
}
/*String[] values = (String[])Pattern.compile("\\*")
	.splitAsStream(skipped)
	.map(v -> Pattern.quote(v))
	.toArray();
String matcher = String.join("(.*)", values);
if (Pattern.compile(matcher).matcher(name).matches()) {
	System.out.println(name +" :: "+skipped+" :: true");
	return true;
}*/

Seems REGEX throw some error

@SkaceKamen SkaceKamen added the bug label Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants