Skip to content

Conversation

@Zapper9982
Copy link
Contributor

@Zapper9982 Zapper9982 commented Apr 25, 2025

πŸ“‹ Description

JIRA ID:

Updated the linting to handle .java and .xml files

  • added Checkstyle.jar which allows linting for .java files
  • xmllint for linting xml files

βœ… Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ”₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • πŸ›  Refactor (change that is neither a fix nor a new feature)
  • βš™οΈ Config change (configuration file or build script updates)
  • πŸ“š Documentation (updates to docs or readme)
  • πŸ§ͺ Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • πŸš€ Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

Screenshots

image

Summary by CodeRabbit

  • Chores
    • Updated linting configuration to include checks for XML files.
    • Adjusted file patterns for TypeScript and JavaScript linting.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 25, 2025

Walkthrough

The lint-staged configuration in package.json was updated to refine the file patterns and linting commands. The ESLint rule was adjusted to target only TypeScript and JavaScript files. A new linting command was added for XML files using xmllint --noout to validate XML syntax. Additionally, a formatting change was made by adding three leading spaces before the package declaration in ResourceRequestGateway.java. No changes were made to exported or public entities.

Changes

File(s) Change Summary
package.json Updated lint-staged configuration: modified ESLint file pattern to TS and JS only; added xmllint for XML files.
src/main/java/com/wipro/fhir/controller/...ResourceRequestGateway.java Added three leading spaces before the package declaration (formatting only).

Poem

A hop and a skip, new linters arrive,
XML files now keep code alive.
ESLint narrows its careful gaze,
While xmllint joins the craze.
With every commit, our code’s more refinedβ€”
A garden of syntax, perfectly aligned!
πŸ‡βœ¨


πŸ“œ Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between bead703 and 3d3aa9e.

πŸ“’ Files selected for processing (1)
  • package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (java)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
package.json (1)

15-17: Review the updated lint-staged file pattern.

The pattern src/**/*.{ts,js} now only includes .ts and .js files.

  • Have CSS and HTML files been intentionally removed from linting?
  • Should we also support .tsx and .jsx (and perhaps other extensions) to avoid unlinted code?
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 02e04d0 and dbba6ee.

β›” Files ignored due to path filters (1)
  • checkstyle.jar is excluded by !**/*.jar
πŸ“’ Files selected for processing (1)
  • package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (java)
πŸ”‡ Additional comments (2)
package.json (2)

18-20: Validate the Checkstyle command and placeholder syntax.

The entry

"*.java": [
  "java -jar checkstyle.jar -c checkstyle.xml {{files}}"
],

may not resolve {{files}} correctly under lint-staged. Lint-staged normally appends file paths automatically. Please confirm:

  • If you need explicit placeholders, use {} instead of {{files}}, or
  • Remove the placeholder and let lint-staged pass the paths by default.

Also verify that checkstyle.jar and checkstyle.xml are correctly located relative to the repo root.


21-23: Ensure correct xmllint invocation for XML files.

The command

"*.xml": [
  "xmllint --noout {{files}}"
]

uses {{files}}, which lint-staged may not recognize. You can rely on lint-staged to append file paths automatically by using:

"xmllint --noout"

Additionally, confirm that xmllint is installed on all target environments (local and CI).

* along with this program. If not, see https://www.gnu.org/licenses/.
*/
package com.wipro.fhir.controller.generateresource;
package com.wipro.fhir.controller.generateresource;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zapper9982 what is this change about?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! I was just checking if the linting was working Java files. I guess I forgot to uncommit that change , lemme fix it

checkstyle.jar Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zapper9982 let's not commit binary files.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 1, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants