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

Expanded excluded dirs and files configuration #45

Merged
merged 1 commit into from
Oct 24, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
*
* @author Gaurav Gupta
* @author Gaurav Gupta, Shiwani Gupta
*/
import static io.github.jeddict.ai.settings.GenAIModel.DEFAULT_MODEL;
import java.util.Arrays;
Expand All @@ -42,6 +42,79 @@ public class PreferencesManager {
private static final String PROVIDER_PREFERENCE = "provider";
private static final String MODEL_PREFERENCE = "model";

private final List<String> EXCLUDE_DIR_DEFAULT = Arrays.asList(
// Test Resources
"src/test/java",
"src/test/resources",
"test",
// Main Resources
"src/main/resources",
"src/main/webapp",
// Build Directories
"target",
"build",
"out", // Output directory for compiled files

// IDE Specific Directories
".idea",
".vscode",
".settings",
".classpath", // Eclipse classpath file
".project", // Eclipse project file
"nbproject",
"nbactions.xml",
"nb-configuration.xml",
// Version Control Directories
".git",
".svn",
// Temporary Directories
"tmp",
"temp",
// Log Directories
"logs",
"log",
"debug",
"trace",
"cache",
"backup",

// Other Configuration/Files
".env", // Environment variable definitions
"docker-compose.yml", // Docker Compose config
"Dockerfile", // Docker configuration

// JavaScript Project Directories
"node_modules",
"dist",
"public",
"build",
".next",
// Gradle
"gradle",
"gradlew",
"gradlew.bat",
// Github
".github",
".dependabot",
".gitignore",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
"LICENSE",

// Security and Configuration Files
"secrets", // Directory for secrets
"credentials", // Directory for credentials
"private",
"confidential",
"vault",

// CI configuration
".gitlab-ci.yml",
".travis.yml",
"azure-pipelines.yml",
"Jenkinsfile"
);

private PreferencesManager() {
preferences = NbPreferences.forModule(AIAssistancePanel.class);
}
Expand Down Expand Up @@ -253,12 +326,6 @@ public List<String> getFileExtensionListToInclude() {
return acceptedExtensions;
}

private final List<String> EXCLUDE_DIR_DEFAULT = Arrays.asList(
"src/test/java", "src/test/resources",
"src/main/resources", "src/main/webapp",
"target", "build",
"nb-configurations.xml"," "
);
private List<String> excludeDir = Collections.EMPTY_LIST;

public String getExcludeDirs() {
Expand Down
Loading