Skip to content

Commit

Permalink
Fix: Not processing empty file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rtfsc8 committed Jan 18, 2019
1 parent 23f1339 commit 5bb1726
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 46 deletions.
48 changes: 2 additions & 46 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,40 +159,12 @@ local.properties
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# ignore .idea directory
.idea/

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

Expand All @@ -205,25 +177,9 @@ out/
# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

.idea/checkstyle-idea.xml
.idea/copyright/
.idea/encodings.xml
.idea/inspectionProfiles/
.idea/markdown-navigator.xml
.idea/markdown-navigator/
.idea/misc.xml
.idea/modules.xml
.idea/staruml-java.iml
.idea/vcs.xml
4 changes: 4 additions & 0 deletions code-analyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ class JavaCodeAnalyzer {
this._files.forEach(file => {
var data = fs.readFileSync(file, 'utf8')
try {
/* Not processing empty file @author Rtfsc8([email protected]) */
if (!!!data) {
return;
}
var ast = java7.parse(data)
this._currentCompilationUnit = ast
this._currentCompilationUnit.file = file
Expand Down

0 comments on commit 5bb1726

Please sign in to comment.