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

Use JGit to filter newly added/modified sql queries only for codegen #188

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

swanandvk
Copy link
Contributor

@swanandvk swanandvk commented Apr 22, 2021

Feature: Add support for generating code for newly added or modified files based on git index.

Existing implementation:

It takes all the sql files provided in the configured directory for code generation.

New Implementation:

  • If no GIT repository is configured in target project then fallback to default behaviour viz. use all sql files for codegen
  • If any untracked file or modified file is available then use only those files for code generation

Advantage:

It does not depend on gradle cache hence the initial run also does not generate code for unintended files.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@swanandvk swanandvk marked this pull request as ready for review April 22, 2021 05:48
@swanandvk swanandvk marked this pull request as draft April 22, 2021 06:34
@kdabir
Copy link
Member

kdabir commented Apr 22, 2021

This is great start. It would be great if you could cover or plan for cases when:

  • file has a diff (the happy path)
  • file is new and not in git index yet
  • file is renamed
  • file path has changed
  • file is deleted

@swanandvk swanandvk marked this pull request as ready for review June 7, 2021 12:57
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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