diff --git a/DEVELOPER.md b/DEVELOPER.md new file mode 100644 index 0000000..850d5bb --- /dev/null +++ b/DEVELOPER.md @@ -0,0 +1,43 @@ + +# Developer notes + +## Development + +### installing tools needed + +TODO some commands/packages + +### build + +TODO command + +### run tests locally + +TODO command + +### testing plugin in eclipse + +TODO write description + +## release process + +### version + + * Update version in the files see f260c53 + TODO right now this is done manually can it be done more automated? + * create a tag in the repo + * create a release in github + +### updating files + +download artifact "cppcheclipse-repository" from the github action "Java CI" +unzip the artifact and upload files to https://files.cppchecksolutions.com/cppcheclipse/ folder + +### publish plugin in marketplace + +to make sure that proper version info etc is shown in marketplace. +https://marketplace.eclipse.org +login +goto cppcheclipse plugin +click on "Edit" button at the top +Add version diff --git a/com.googlecode.cppcheclipse.core.tests/META-INF/MANIFEST.MF b/com.googlecode.cppcheclipse.core.tests/META-INF/MANIFEST.MF index 59d3fb2..2af1062 100644 --- a/com.googlecode.cppcheclipse.core.tests/META-INF/MANIFEST.MF +++ b/com.googlecode.cppcheclipse.core.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: cppcheclipse Core Tests Bundle-SymbolicName: com.googlecode.cppcheclipse.core.tests -Bundle-Version: 1.2.3.qualifier +Bundle-Version: 1.2.4.qualifier Bundle-Vendor: Konrad Windszus Fragment-Host: com.googlecode.cppcheclipse.core;bundle-version="0.9.8" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/com.googlecode.cppcheclipse.core.tests/pom.xml b/com.googlecode.cppcheclipse.core.tests/pom.xml index 551fc71..65d8417 100644 --- a/com.googlecode.cppcheclipse.core.tests/pom.xml +++ b/com.googlecode.cppcheclipse.core.tests/pom.xml @@ -6,7 +6,7 @@ com.googlecode.cppcheclipse.parent com.googlecode.cppcheclipse - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ../com.googlecode.cppcheclipse.parent/pom.xml com.googlecode.cppcheclipse.core.tests diff --git a/com.googlecode.cppcheclipse.core/META-INF/MANIFEST.MF b/com.googlecode.cppcheclipse.core/META-INF/MANIFEST.MF index dc64ded..cea0b27 100644 --- a/com.googlecode.cppcheclipse.core/META-INF/MANIFEST.MF +++ b/com.googlecode.cppcheclipse.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: cppcheclipse Core Bundle-SymbolicName: com.googlecode.cppcheclipse.core;singleton:=true -Bundle-Version: 1.2.3.qualifier +Bundle-Version: 1.2.4.qualifier Bundle-Activator: com.googlecode.cppcheclipse.core.CppcheclipsePlugin Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0", org.eclipse.ui;bundle-version="3.5.0", diff --git a/com.googlecode.cppcheclipse.core/pom.xml b/com.googlecode.cppcheclipse.core/pom.xml index 06832bb..7cbc138 100644 --- a/com.googlecode.cppcheclipse.core/pom.xml +++ b/com.googlecode.cppcheclipse.core/pom.xml @@ -6,7 +6,7 @@ com.googlecode.cppcheclipse.parent com.googlecode.cppcheclipse - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ../com.googlecode.cppcheclipse.parent/pom.xml com.googlecode.cppcheclipse.core diff --git a/com.googlecode.cppcheclipse.feature/feature.xml b/com.googlecode.cppcheclipse.feature/feature.xml index ad4cb3c..2cdd4c5 100644 --- a/com.googlecode.cppcheclipse.feature/feature.xml +++ b/com.googlecode.cppcheclipse.feature/feature.xml @@ -2,7 +2,7 @@ @@ -233,44 +233,26 @@ litigation. + version="0.0.0"/> + version="0.0.0"/> + version="0.0.0"/> + version="0.0.0"/> + version="0.0.0"/> + version="0.0.0"/> diff --git a/com.googlecode.cppcheclipse.feature/pom.xml b/com.googlecode.cppcheclipse.feature/pom.xml index 50b18d9..359aeae 100644 --- a/com.googlecode.cppcheclipse.feature/pom.xml +++ b/com.googlecode.cppcheclipse.feature/pom.xml @@ -6,7 +6,7 @@ com.googlecode.cppcheclipse.parent com.googlecode.cppcheclipse - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ../com.googlecode.cppcheclipse.parent/pom.xml com.googlecode.cppcheclipse.feature diff --git a/com.googlecode.cppcheclipse.parent/pom.xml b/com.googlecode.cppcheclipse.parent/pom.xml index 37967c3..53ed8c2 100644 --- a/com.googlecode.cppcheclipse.parent/pom.xml +++ b/com.googlecode.cppcheclipse.parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.googlecode.cppcheclipse com.googlecode.cppcheclipse.parent - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT pom @@ -108,6 +108,11 @@ cocoa x86_64 + + macosx + cocoa + aarch64 + diff --git a/com.googlecode.cppcheclipse.repository/category.xml b/com.googlecode.cppcheclipse.repository/category.xml index 71180e0..a8f2847 100644 --- a/com.googlecode.cppcheclipse.repository/category.xml +++ b/com.googlecode.cppcheclipse.repository/category.xml @@ -1,6 +1,6 @@ - + diff --git a/com.googlecode.cppcheclipse.repository/pom.xml b/com.googlecode.cppcheclipse.repository/pom.xml index 1ef8d31..00e23cc 100644 --- a/com.googlecode.cppcheclipse.repository/pom.xml +++ b/com.googlecode.cppcheclipse.repository/pom.xml @@ -6,7 +6,7 @@ com.googlecode.cppcheclipse.parent com.googlecode.cppcheclipse - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ../com.googlecode.cppcheclipse.parent/pom.xml com.googlecode.cppcheclipse.repository diff --git a/com.googlecode.cppcheclipse.target/pom.xml b/com.googlecode.cppcheclipse.target/pom.xml index cd2f57d..6eba49b 100644 --- a/com.googlecode.cppcheclipse.target/pom.xml +++ b/com.googlecode.cppcheclipse.target/pom.xml @@ -5,7 +5,7 @@ com.googlecode.cppcheclipse.parent com.googlecode.cppcheclipse - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ../com.googlecode.cppcheclipse.parent/pom.xml diff --git a/com.googlecode.cppcheclipse.ui.tests/META-INF/MANIFEST.MF b/com.googlecode.cppcheclipse.ui.tests/META-INF/MANIFEST.MF index 39813ff..cd1e73a 100644 --- a/com.googlecode.cppcheclipse.ui.tests/META-INF/MANIFEST.MF +++ b/com.googlecode.cppcheclipse.ui.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: cppcheclipse UI Tests Bundle-SymbolicName: com.googlecode.cppcheclipse.ui.tests -Bundle-Version: 1.2.3.qualifier +Bundle-Version: 1.2.4.qualifier Bundle-Vendor: Konrad Windszus Fragment-Host: com.googlecode.cppcheclipse.ui;bundle-version="0.9.8" Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/com.googlecode.cppcheclipse.ui.tests/pom.xml b/com.googlecode.cppcheclipse.ui.tests/pom.xml index 58dd472..c7980c3 100644 --- a/com.googlecode.cppcheclipse.ui.tests/pom.xml +++ b/com.googlecode.cppcheclipse.ui.tests/pom.xml @@ -6,7 +6,7 @@ com.googlecode.cppcheclipse.parent com.googlecode.cppcheclipse - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ../com.googlecode.cppcheclipse.parent/pom.xml com.googlecode.cppcheclipse.ui.tests diff --git a/com.googlecode.cppcheclipse.ui/META-INF/MANIFEST.MF b/com.googlecode.cppcheclipse.ui/META-INF/MANIFEST.MF index ce2ace4..d1e8258 100644 --- a/com.googlecode.cppcheclipse.ui/META-INF/MANIFEST.MF +++ b/com.googlecode.cppcheclipse.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: cppcheclipse UI Bundle-SymbolicName: com.googlecode.cppcheclipse.ui;singleton:=true -Bundle-Version: 1.2.3.qualifier +Bundle-Version: 1.2.4.qualifier Bundle-Activator: com.googlecode.cppcheclipse.ui.Activator Bundle-Vendor: Konrad Windszus Require-Bundle: org.eclipse.ui;bundle-version="3.4.0", diff --git a/com.googlecode.cppcheclipse.ui/pom.xml b/com.googlecode.cppcheclipse.ui/pom.xml index 60c6201..e231388 100644 --- a/com.googlecode.cppcheclipse.ui/pom.xml +++ b/com.googlecode.cppcheclipse.ui/pom.xml @@ -6,7 +6,7 @@ com.googlecode.cppcheclipse.parent com.googlecode.cppcheclipse - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ../com.googlecode.cppcheclipse.parent/pom.xml com.googlecode.cppcheclipse.ui diff --git a/com.googlecode.cppcheclipse.ui/src/com/googlecode/cppcheclipse/ui/ToolchainSettings.java b/com.googlecode.cppcheclipse.ui/src/com/googlecode/cppcheclipse/ui/ToolchainSettings.java index 461edb7..39b04c2 100644 --- a/com.googlecode.cppcheclipse.ui/src/com/googlecode/cppcheclipse/ui/ToolchainSettings.java +++ b/com.googlecode.cppcheclipse.ui/src/com/googlecode/cppcheclipse/ui/ToolchainSettings.java @@ -3,6 +3,7 @@ import java.io.File; import java.net.URI; import java.util.Collection; +import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; @@ -20,6 +21,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IPath; import com.googlecode.cppcheclipse.core.CppcheclipsePlugin; import com.googlecode.cppcheclipse.core.IToolchainSettings; @@ -35,11 +37,14 @@ * */ public class ToolchainSettings implements IToolchainSettings { - private static final String EXTENSION_CPP = "cpp"; private final List languageSettings; private final ICConfigurationDescription activeConfiguration; private final IProject project; private final IWorkspaceRoot root; + private static final String[] C_EXTENSIONS = { ".c", ".cl" }; + private static final String[] CPP_EXTENSIONS = { + ".cpp", ".cxx", ".cc", ".c++", ".tpp", ".txx", ".ipp", ".ixx" + }; public ToolchainSettings(IProject project) throws IllegalStateException { languageSettings = new LinkedList(); @@ -66,13 +71,14 @@ public ToolchainSettings(IProject project) throws IllegalStateException { ICLanguageSetting[] allLanguageSettings = folderDescription .getLanguageSettings(); - // fetch the include settings from the first tool which supports c - for (ICLanguageSetting languageSetting : allLanguageSettings) { - String extensions[] = languageSetting.getSourceExtensions(); - for (String extension : extensions) { - if (EXTENSION_CPP.equalsIgnoreCase(extension)) { //$NON-NLS-1$ - languageSettings.add(languageSetting); - } + for (ICLanguageSetting ls : allLanguageSettings) { + String[] exts = ls.getSourceExtensions(); + for (String ext : exts) { + if (containsIgnoreCase(C_EXTENSIONS, ext) + || containsIgnoreCase(CPP_EXTENSIONS, ext)) { + languageSettings.add(ls); + break; + } } } @@ -160,7 +166,7 @@ protected Collection resolveIncludePath(File includePath) * @return all include folders in a list */ protected Collection getIncludes(boolean onlyUserDefined) { - Collection paths = new LinkedList(); + Collection paths = new LinkedHashSet(); IWorkspaceRoot workspaceRoot = project.getWorkspace().getRoot(); URI workspaceUri = workspaceRoot.getLocationURI(); @@ -179,7 +185,12 @@ protected Collection getIncludes(boolean onlyUserDefined) { if (includePathSetting instanceof ACPathEntry) { // let CDT do the resolution for all ACPathEntries which should cover all include settings ACPathEntry includePathEntry = (ACPathEntry) includePathSetting; - includePath = includePathEntry.getLocation().toFile(); + IPath location = includePathEntry.getLocation(); + if (location == null) { + continue; + } + + includePath = location.toFile(); } else { // make path absolute @@ -232,4 +243,22 @@ protected Collection getSymbols(boolean onlyUserDefined) { } return symbols; } + + /** + * Helper function to check if array of strings contain a given string, ignoring case. + * + * @param values + * Array of strings to check + * @param value + * String to check against + * @return whether values contains value (ignoring case) + */ + private static boolean containsIgnoreCase(String[] values, String value) { + for (String s : values) { + if (s.equalsIgnoreCase(value)) { + return true; + } + } + return false; + } }