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

фикс для обновления mdclasses #3322

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ repositories {
mavenCentral()
maven(url = "https://jitpack.io")
maven(url = "https://projectlombok.org/edge-releases")
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots")
}

group = "io.github.1c-syntax"
Expand Down Expand Up @@ -88,9 +89,11 @@ dependencies {
exclude("org.antlr", "antlr-runtime")
}
api("io.github.1c-syntax", "utils", "0.6.1")
api("io.github.1c-syntax", "mdclasses", "0.13.0")
api("io.github.1c-syntax", "bsl-common-library", "0.6.0")
api("io.github.1c-syntax", "supportconf", "0.14.0")
api("io.github.1c-syntax", "mdclasses", "0.14.0")
api("io.github.1c-syntax", "bsl-common-library", "0.7.0")
api("io.github.1c-syntax", "supportconf", "0.14.0") {
exclude("io.github.1c-syntax", "bsl-common-library")
}
api("io.github.1c-syntax", "bsl-parser-core", "0.1.0")

// JLanguageTool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public void check() {
.filter(reference -> reference.getSymbol().isDeprecated())
.filter(reference -> !reference.getFrom().isDeprecated())
.forEach((Reference reference) -> {
Symbol deprecatedSymbol = reference.getSymbol();
String deprecationInfo = getDeprecationInfo(deprecatedSymbol);
String message = info.getMessage(deprecatedSymbol.getName(), deprecationInfo);
var deprecatedSymbol = reference.getSymbol();
var deprecationInfo = getDeprecationInfo(deprecatedSymbol);
var message = info.getMessage(deprecatedSymbol.getName(), deprecationInfo);
diagnosticStorage.addDiagnostic(reference.getSelectionRange(), message);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ private static class MethodCall {
Boolean[] parameters;
Range range;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import com.github._1c_syntax.bsl.types.MdoReference;
import com.github._1c_syntax.utils.CaseInsensitivePattern;
import edu.umd.cs.findbugs.annotations.Nullable;
import lombok.AllArgsConstructor;
import lombok.Value;
import org.antlr.v4.runtime.tree.ParseTree;
import org.eclipse.lsp4j.Range;

Expand Down Expand Up @@ -160,8 +158,8 @@ private Map<String, List<String>> calcDataSourceWithTabularSectionNames(
.map(dataSourceContext -> new TabularSectionTable(getTableNameOrAlias(dataSourceContext),
getTabularSectionNames(dataSourceContext)))
.collect(Collectors.toMap(
TabularSectionTable::getTableNameOrAlias,
TabularSectionTable::getTabularSectionNames,
TabularSectionTable::tableNameOrAlias,
TabularSectionTable::tabularSectionNames,
(existing, replacement) -> existing));
}

Expand Down Expand Up @@ -322,10 +320,6 @@ private static List<ParseTree> extractFirstMetadataTypeName(SDBLParser.ColumnCon
return children.subList(1, children.size() - 1);
}

@Value
@AllArgsConstructor
private static class TabularSectionTable {
String tableNameOrAlias;
List<String> tabularSectionNames;
private record TabularSectionTable(String tableNameOrAlias, List<String> tabularSectionNames) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ public void check() {
documentContext.getSymbolTree().getVariables().stream()
.filter(variable -> CHECKING_VARIABLE_KINDS.contains(variable.getKind()))
.filter(variable -> !variable.isExport())
.filter(variable -> referenceIndex.getReferencesTo(variable).stream().filter(ref -> ref.getOccurrenceType() == OccurrenceType.REFERENCE).findFirst().isEmpty())
.forEach(variable -> diagnosticStorage.addDiagnostic(variable.getSelectionRange(), info.getMessage(variable.getName())));
.filter(variable -> referenceIndex.getReferencesTo(variable).stream()
.filter(ref -> ref.getOccurrenceType() == OccurrenceType.REFERENCE).findFirst().isEmpty()
)
.forEach(variable -> diagnosticStorage.addDiagnostic(
variable.getSelectionRange(), info.getMessage(variable.getName()))
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected void check() {
}

private static boolean wrongDataPath(FormItem formItem) {
return formItem.getDataPath().getSegments().startsWith("~");
return formItem.getDataPath().segments().startsWith("~");
}

private static boolean haveFormModules(Form form) {
Expand Down
Loading