Skip to content

Conversation

@titusfortner
Copy link
Member

@titusfortner titusfortner commented Dec 12, 2025

User description

🔗 Related Issues

Use latest bazel plugin & related updates

💥 What does this PR do?

  • Prompt users to install new bazel plugin and google-java-format
  • Puts project file where new plugin expects
  • Stop build errors when synchronizing by not trying to sync common/remote-build (RBE environment only)
  • remove tracking .idea/misc.xml since IntelliJ is trying to name the JDK which is user specific
  • add tracking .idea/vcs.xml since IntelliJ is "helpfully" trying to add the bazel output as a VCS target

🔧 Implementation Notes

I did not remove old bazel files if people already have things imported that way it should still work

💡 Additional Considerations

If you don't want the plugins you can ignore the import, but it may be annoying, so maybe we don't want that part
We don't have to include google-java-format, but it is really nice


PR Type

Enhancement


Description

  • Update IntelliJ/JetBrains IDE integration with latest Bazel plugin

  • Add external dependencies configuration for required plugins

  • Remove user-specific JDK configuration from misc.xml

  • Add VCS configuration to prevent automatic Bazel output mapping

  • Create new Bazel project file excluding remote-build directory

  • Update README with plugin installation instructions


Diagram Walkthrough

flowchart LR A["IDE Configuration"] --> B["External Dependencies"] A --> C["VCS Settings"] A --> D["Bazel Project File"] B --> E["Bazel Plugin"] B --> F["google-java-format Plugin"] C --> G["Prevent Auto VCS Mapping"] D --> H["Exclude remote-build"] I["Documentation"] --> J["Updated README"] J --> K["Plugin Installation Guide"] 
Loading

File Walkthrough

Relevant files
Configuration changes
externalDependencies.xml
Add external plugin dependencies configuration                     

.idea/externalDependencies.xml

  • New file declaring required IDE plugins
  • Specifies JetBrains Bazel plugin dependency
  • Specifies google-java-format plugin dependency
+7/-0     
misc.xml
Remove user-specific project configuration file                   

.idea/misc.xml

  • Removed entire file to eliminate user-specific JDK configuration
  • Prevents tracking of machine-dependent project settings
  • Reduces merge conflicts from IDE-generated content
+0/-9     
vcs.xml
Add VCS configuration to prevent auto-mapping                       

.idea/vcs.xml

  • New file configuring VCS directory mappings
  • Explicitly sets Git as VCS for root directory
  • Disables automatic VCS mapping detection to prevent Bazel output
    inclusion
+9/-0     
.managed.bazelproject
Add managed Bazel project configuration file                         

tools/intellij/.managed.bazelproject

  • New Bazel project configuration file for managed IDE integration
  • Includes all directories except common/remote-build to avoid RBE sync
    issues
  • Enables automatic target derivation from directory structure
+8/-0     
Documentation
README.md
Update IDE setup documentation with plugin guidance           

README.md

  • Updated section title from IntelliJ to JetBrains for broader IDE
    coverage
  • Replaced manual plugin installation instructions with automatic plugin
    prompts
  • Added google-java-format plugin recommendation for code formatting
  • Simplified setup process by removing manual Bazel project file
    selection
+7/-7     

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🟡
🎫 #5678
🔴 Investigate and resolve repeated "Error: ConnectFailure (Connection refused)" when
instantiating additional ChromeDriver instances on Ubuntu 16.04 with Chrome 65 and
ChromeDriver 2.35 using Selenium 3.9.0.
Provide reproducible steps or fixes specific to Chrome/ChromeDriver connectivity issues
after the first instance.
🟡
🎫 #1234
🔴 Ensure WebDriver 2.48 triggers JavaScript in link href on click() in Firefox 42 where it
previously worked in 2.47.1.
Provide fix or regression handling so click() executes javascript: URLs as expected.
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
Not applicable scope: The PR adds IDE configuration and documentation without introducing or modifying any
runtime actions that would require audit logging, so no new audit trails are applicable in
the shown changes.

Referred Code
#### JetBrains Most of the team uses IntelliJ or other JetBrains IDEs for their day-to-day editing. Opening Selenium with IntelliJ will request to install two plugins: * The [JetBrains Bazel plugin](https://plugins.jetbrains.com/plugin/22977-bazel), which will automatically synchronize upon opening. * The [google-java-format plugin](https://plugins.jetbrains.com/plugin/8527-google-java-format) to allow your IDE to keep any Java formatting for you. Follow additional directions as provided. 

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Config edge cases: The new Bazel project configuration excludes 'common/remote-build' but contains
no explicit handling for sync or resolution failures; as a config file this may be
acceptable but cannot be fully verified from the diff.

Referred Code
directories: # Add the directories you want added as source here # Loads all directories by default except do not want to sync remote-build locally . -common/remote-build # Automatically includes all relevant targets under the 'directories' above derive_targets_from_directories: true

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Update .gitignore for new IDE files

Update the project's .gitignore file to explicitly track the new shared IDE
configuration files within the .idea directory, which is typically ignored by
default.

Examples:

.idea/externalDependencies.xml [1-7]
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ExternalDependencies"> <plugin id="google-java-format" /> <plugin id="org.jetbrains.bazel" /> </component> </project>
.idea/vcs.xml [1-9]
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="VcsDirectoryMappings"> <mapping directory="" vcs="Git" /> </component> <component name="VcsProjectSettings"> <option name="detectVcsMappingsAutomatically" value="false" /> </component> </project>

Solution Walkthrough:

Before:

# .gitignore # IDE configuration .idea/ *.iml 

After:

# .gitignore # IDE configuration # Ignore user-specific files .idea/workspace.xml .idea/tasks.xml # Un-ignore shared configuration files !.idea/externalDependencies.xml !.idea/vcs.xml 
Suggestion importance[1-10]: 9

__

Why: This suggestion is critical because without updating the .gitignore file, the new shared IDE configuration files in .idea/ would not be version-controlled, defeating the primary purpose of the PR.

High
General
Exclude non-source directories from indexing

In tools/intellij/.managed.bazelproject, explicitly exclude the .git and .idea
directories from indexing to improve IDE performance and prevent potential
errors.

tools/intellij/.managed.bazelproject [1-5]

 directories: # Add the directories you want added as source here # Loads all directories by default except do not want to sync remote-build locally . -common/remote-build + -.git + -.idea
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that indexing directories like .git and .idea is unnecessary and can degrade IDE performance, which is a valid improvement for developer experience.

Low
Learned
best practice
Clarify plugin name and scope

Clarify the plugin’s exact name and scope to avoid confusion with deprecated
artifacts; include a brief note on compatible IDE versions.

README.md [191-192]

-* The [JetBrains Bazel plugin](https://plugins.jetbrains.com/plugin/22977-bazel),  -which will automatically synchronize upon opening. +* The [Bazel (JetBrains) plugin](https://plugins.jetbrains.com/plugin/22977-bazel)  + (requires recent IntelliJ/JetBrains IDE versions; will automatically synchronize upon opening).
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Validate and sanitize external inputs, including links, to avoid broken or outdated references and ensure clarity about scope.

Low
  • More
@titusfortner
Copy link
Member Author

So this syncs and populates targets in the Bazel window, but I'm still getting what @asolntsev showed in #16680
I'm still investigating. Moving this to draft until I can fix it.

@titusfortner titusfortner marked this pull request as draft December 14, 2025 15:27
@titusfortner
Copy link
Member Author

It's cool that you can right-click and run tests from the IDE, but that doesn't matter much when the file shows missing imports. I can't get it to work, so I'll have to check back later when the plugin updates to see if it fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants