Skip to content

Commit

Permalink
Optimize imports (by IntelliJ):
Browse files Browse the repository at this point in the history
- Drop unused imports (!)
- Re-order imports alphabetically
- Resolve star imports
  • Loading branch information
ascheman committed Jan 4, 2023
1 parent 5098873 commit 7d54e18
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 42 deletions.
2 changes: 0 additions & 2 deletions src/main/groovy/org/aim42/filesystem/FileCollector.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package org.aim42.filesystem

import groovy.io.FileType

import java.util.regex.Pattern

// see end-of-file for license information

// TODO: add exclude-patterns
Expand Down
12 changes: 4 additions & 8 deletions src/main/groovy/org/aim42/htmlsanitycheck/AllChecksRunner.groovy
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
package org.aim42.htmlsanitycheck

import org.aim42.filesystem.FileCollector
import org.aim42.filesystem.FileUtil
import org.aim42.htmlsanitycheck.check.*

import org.aim42.htmlsanitycheck.check.Checker
import org.aim42.htmlsanitycheck.check.CheckerCreator
import org.aim42.htmlsanitycheck.collect.PerRunResults
import org.aim42.htmlsanitycheck.collect.SinglePageResults
import org.aim42.htmlsanitycheck.html.HtmlPage
import org.aim42.htmlsanitycheck.report.ConsoleReporter
import org.aim42.htmlsanitycheck.report.HtmlReporter
import org.aim42.htmlsanitycheck.report.JUnitXmlReporter
import org.aim42.htmlsanitycheck.report.LoggerReporter
import org.aim42.htmlsanitycheck.report.Reporter
import org.aim42.htmlsanitycheck.report.*
import org.slf4j.Logger
import org.slf4j.LoggerFactory

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.aim42.htmlsanitycheck

import org.aim42.filesystem.FileCollector

import org.aim42.htmlsanitycheck.check.AllCheckers
import org.aim42.inet.NetUtil

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

package org.aim42.htmlsanitycheck

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.language.base.plugins.LifecycleBasePlugin
import org.gradle.api.Plugin


class HtmlSanityCheckPlugin implements Plugin<Project> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.aim42.htmlsanitycheck.check

import org.aim42.htmlsanitycheck.Configuration
import org.aim42.htmlsanitycheck.check.UnknownCheckerException
import org.slf4j.Logger
import org.slf4j.LoggerFactory

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.aim42.htmlsanitycheck.check

import org.aim42.htmlsanitycheck.Configuration
import org.aim42.htmlsanitycheck.html.HtmlPage
import org.aim42.htmlsanitycheck.html.URLUtil
import org.aim42.htmlsanitycheck.collect.SingleCheckResults
import org.aim42.htmlsanitycheck.html.HtmlElement
import org.aim42.htmlsanitycheck.html.HtmlPage
import org.aim42.htmlsanitycheck.html.URLUtil
import org.slf4j.Logger
import org.slf4j.LoggerFactory

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.aim42.htmlsanitycheck.check

import org.aim42.htmlsanitycheck.html.HtmlPage
import org.aim42.htmlsanitycheck.html.URLUtil
import org.aim42.htmlsanitycheck.Configuration
import org.aim42.htmlsanitycheck.collect.SingleCheckResults
import org.aim42.htmlsanitycheck.html.HtmlPage
import org.aim42.htmlsanitycheck.html.URLUtil
import org.slf4j.Logger
import org.slf4j.LoggerFactory

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.aim42.htmlsanitycheck.html

import groovy.transform.Memoized

import java.util.regex.Pattern
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.select.Elements

import java.util.regex.Pattern

// see end-of-file for license information

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.aim42.htmlsanitycheck.report

import groovy.transform.InheritConstructors
import org.aim42.htmlsanitycheck.ProductVersion
import org.aim42.htmlsanitycheck.collect.PerRunResults
import org.aim42.htmlsanitycheck.collect.SingleCheckResults
import org.aim42.htmlsanitycheck.collect.SinglePageResults
import org.slf4j.Logger

/************************************************************************
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package org.aim42.htmlsanitycheck.suggest;
package org.aim42.htmlsanitycheck.suggest

import net.ricecode.similarity.JaroWinklerStrategy;
import net.ricecode.similarity.SimilarityStrategy;
import net.ricecode.similarity.StringSimilarityService;
import net.ricecode.similarity.StringSimilarityServiceImpl;

import java.util.ArrayList;
import java.util.List;
import net.ricecode.similarity.JaroWinklerStrategy
import net.ricecode.similarity.StringSimilarityService
import net.ricecode.similarity.StringSimilarityServiceImpl

/**
* Finds suggestions for a target within a given list of options by applying string-similarity search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
package net.ricecode.similarity;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Collections;


/**
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/org/aim42/net/TrustAllCertificates.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

// created by https://www.geekality.net/2013/09/27/java-ignore-ssl-certificate-errors/

import javax.net.ssl.*;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.X509Certificate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.aim42.htmlsanitycheck

import org.aim42.htmlsanitycheck.check.AllCheckers
import org.aim42.htmlsanitycheck.collect.SinglePageResults
import org.junit.Before
import org.junit.Test

class AllChecksRunnerTest extends GroovyTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.aim42.htmlsanitycheck
import org.gradle.testkit.runner.GradleRunner
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import org.aim42.htmlsanitycheck.collect.SingleCheckResults
import org.aim42.htmlsanitycheck.html.HtmlConst
import org.aim42.htmlsanitycheck.html.HtmlPage
import org.aim42.inet.NetUtil
import spock.lang.IgnoreIf
import spock.lang.Ignore
import spock.lang.IgnoreIf
import spock.lang.Specification
import spock.lang.Unroll


// see end-of-file for license information


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.aim42.htmlsanitycheck.check
import org.aim42.htmlsanitycheck.Configuration
import org.aim42.htmlsanitycheck.html.HtmlPage
import spock.lang.Specification
import sun.security.krb5.Config

/**
* specifiy behavior of CheckerCreator factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import org.aim42.htmlsanitycheck.collect.SingleCheckResults
import org.aim42.htmlsanitycheck.collect.SinglePageResults
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder

// see end-of-file for license information

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
package org.aim42.htmlsanitycheck.suggest;


import net.ricecode.similarity.*;
import net.ricecode.similarity.JaroWinklerStrategy;
import net.ricecode.similarity.SimilarityScore;
import net.ricecode.similarity.SimilarityStrategy;
import net.ricecode.similarity.StringSimilarityService;
import net.ricecode.similarity.StringSimilarityServiceImpl;
import org.junit.Before;
import org.junit.Test;

Expand Down
1 change: 0 additions & 1 deletion src/test/java/org/aim42/UnsecureHttpConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import javax.net.ssl.HttpsURLConnection;
import java.net.HttpURLConnection;
import java.net.URL;

public class UnsecureHttpConnection {
Expand Down

0 comments on commit 7d54e18

Please sign in to comment.