Skip to content

Commit

Permalink
Fixed jQA plugin version
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianWendorf committed Nov 14, 2024
1 parent 2bd8786 commit cd0e8fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.buschmais.jqassistant.core.scanner.api.ScannerPlugin.Requires;
import com.buschmais.jqassistant.core.scanner.api.Scope;
import com.buschmais.jqassistant.core.store.api.Store;
import com.buschmais.jqassistant.plugin.common.api.model.NamedDescriptor;
import com.buschmais.jqassistant.plugin.common.api.scanner.AbstractScannerPlugin;
import com.buschmais.jqassistant.plugin.common.api.scanner.filesystem.FileResource;
import com.buschmais.jqassistant.plugin.yaml2.api.model.YMLFileDescriptor;
Expand All @@ -16,12 +15,6 @@
import org.jqassistant.plugin.pub.impl.model.Package;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;

import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.toList;

/**
* Scanner plugin for pubspec.yaml files.
Expand All @@ -48,27 +41,4 @@ public PackageDescriptor scan(FileResource fileResource, String path, Scope scop

return PackageMapper.INSTANCE.updateDescriptor(value, packageDescriptor, scanner);
}

// private PersonDescriptor getPersonDescriptor(Package.Person author, Store store) {
// PersonDescriptor authorDescriptor = store.create(PersonDescriptor.class);
// authorDescriptor.setName(author.getName());
// authorDescriptor.setEmail(author.getEmail());
// authorDescriptor.setUrl(author.getUrl());
// return authorDescriptor;
// }

private <T extends NamedDescriptor> List<T> map(Map<String, String> map, Class<T> descriptorType, BiConsumer<T, String> valueConsumer, Store store) {
if (map != null) {
return map.entrySet()
.stream()
.map(entry -> {
T descriptor = store.create(descriptorType);
descriptor.setName(entry.getKey());
valueConsumer.accept(descriptor, entry.getValue());
return descriptor;
})
.collect(toList());
}
return emptyList();
}
}
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/jqassistant-plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<jqassistant-plugin xmlns="http://schema.jqassistant.org/plugin/v2.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.jqassistant.org/plugin/v2.4 https://schema.jqassistant.org/plugin/jqassistant-plugin-v2.4.xsd"
name="jQAssistant pub Plugin" id="jqa.plugin.pub">
name="jQAssistant pub Plugin" id="jqa.plugin.pub"
version="${project.version}">
<description>Provides scanners and rules for pub based projects.</description>
<model>
<class>org.jqassistant.plugin.pub.api.model.DependencyDescriptor</class>
Expand Down

0 comments on commit cd0e8fc

Please sign in to comment.