Skip to content

A static analysis tool for Mapped SQL Statement in MyBatis (JUnit Testing only during the development). The license hasn't been decided yet.

Notifications You must be signed in to change notification settings

qwefgh90/maplint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maplint

⚠️ Any updates might be delayed until the Java static analyzer project is complete in another repository.

Maplint is a lint program to check errors in Mapped SQL Statement. It's being developed based on a recent paper that introduces four analysis methods for finding out various errors in statements. Main concepts are the access to the database and the compilation of Java code during development phase.

Project structure

Maplint is a multi-module java project based on Maven.

  • java-eager: Project Import, Type Finder for Java Class
  • lint: Command Line Interface, MyBatis parser, Diagnostic package

⚠️ At some point, java-eager project wil be moved to another repository.

🚩 Feature List

Description Status
🟩 Key Feature
SQL Grammar Check Check if DDL, DML statements are correct grammatically ✔️
Object Existence Check Check if the column and table exists in the database
with the JDBC Connection
✔️
Property Existence Check Check if the java property exists in classes, source codes ✔️
Type Compatibility Check Check type compatibility for every binary expression
consisting of Column and Value
✔️
Diagnostics & Message Data structure for the trace log and meaningful message for the developer ✔️
Command Line Interface
(Facade layer)
Facade API of Unit Test for CLI ✔️
Command Line Interface
(Windows App Packaging)
Release first executable 📆 this year
🟩 Advanced Feature
Dynamic SQL - 📆 this year
Mapper Annotations
(@Select, @Update, ...)
- 📆 this year
Auto download for JDK and tools - 📆 this year
IDE Plugins (vscode, IntelliJ) - 📆 this year

⚠️ This lint is designed based on MyBatis 3.5.9 and JDK 13. It will be tested and upgraded to support more versions of JDK and up-to-date MyBatis.

Getting started

This project doesn't support CLI yet. It's been planned. Currently, uou can only run Unit Testing in Intellij for each submodule.

img.png

Background

This project is based on a recent paper related to MyBatis Development Productivity Improvement. That paper provides methods following four types of errors that developers often encounters during the project using MyBatis.

  • Grammar Error: Use wrong grammar in SQL Statement
  • Object Name Error: Use wrong names of the table and column in the database
  • Property Name Error: Use wrong property names
  • Type Incompatibility Error: Use incompatible types

References

About

A static analysis tool for Mapped SQL Statement in MyBatis (JUnit Testing only during the development). The license hasn't been decided yet.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages