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