diff --git a/.travis.yml b/.travis.yml index e44b55b..37dbb12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ android: - extra-android-support script: - ./gradlew build \ No newline at end of file + ./gradlew checkstyle build \ No newline at end of file diff --git a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/di/ActivityModule.java b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/di/ActivityModule.java index 59679a4..7169db0 100644 --- a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/di/ActivityModule.java +++ b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/di/ActivityModule.java @@ -21,14 +21,13 @@ import dagger.Provides; /** - * Dagger module created to provide some common activity scope depdendencies as @ActivityContext. This - * module is going to be added to the graph generated for every activity while the activity creation - * lifecycle. + * Dagger module created to provide some common activity scope depdendencies as @ActivityContext. + * This module is going to be added to the graph generated for every activity while the activity + * creation lifecycle. * * @author Pedro Vicente Gómez Sánchez */ -@Module(library = true) -public final class ActivityModule { +@Module(library = true) public final class ActivityModule { private final Activity activity; diff --git a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/GetTvShowsInteractor.java b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/GetTvShowsInteractor.java index adc267e..29d9cf7 100644 --- a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/GetTvShowsInteractor.java +++ b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/GetTvShowsInteractor.java @@ -56,7 +56,8 @@ class GetTvShowsInteractor implements Interactor, GetTvShows { @Override public void execute(final Callback callback) { if (callback == null) { throw new IllegalArgumentException( - "Callback can't be null, the client of this interactor needs to get the response in the callback"); + "Callback can't be null, the client of this interactor needs to get the response " + + "in the callback"); } this.callback = callback; this.executor.run(this); diff --git a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/tvshow/Catalog.java b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/tvshow/Catalog.java index e974ac8..3bfd987 100644 --- a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/tvshow/Catalog.java +++ b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/domain/tvshow/Catalog.java @@ -21,7 +21,7 @@ import java.util.Set; /** - * Contains all the available TvShows for this sample. All this harcoded data simulates some + * Contains all the available TvShows for this sample. All this hard coded data simulates some * information obtained from an external service. * * @author Pedro Vicente Gómez Sánchez @@ -393,7 +393,6 @@ public Collection getTvShows() { * * @param tvShowId used to search inside the catalog. * @return a TvShow that matches with the parameter passed as identifier. - * @throws TvShowNotFoundException if there is no TvShow associated to the id passed as * parameter. */ public TvShow getTvShowById(String tvShowId) throws TvShowNotFoundException { diff --git a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/presenter/TvShowUIModule.java b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/presenter/TvShowUIModule.java index 986792d..707184d 100644 --- a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/presenter/TvShowUIModule.java +++ b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/presenter/TvShowUIModule.java @@ -43,8 +43,7 @@ injects = { MainActivity.class, TvShowCatalogFragment.class, TvShowDraggableFragment.class, TvShowFragment.class, TvShowActivity.class - }) -public final class TvShowUIModule { + }) public final class TvShowUIModule { @Provides TvShowRendererBuilder provideTvShowRendererBuilder(TvShowRenderer tvShowRenderer) { LinkedList> renderers = new LinkedList>(); diff --git a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/renderer/chapter/ChapterRenderer.java b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/renderer/chapter/ChapterRenderer.java index cf9565e..ba35d88 100644 --- a/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/renderer/chapter/ChapterRenderer.java +++ b/app/src/main/java/com/github/pedrovgs/effectiveandroidui/ui/renderer/chapter/ChapterRenderer.java @@ -40,8 +40,7 @@ public class ChapterRenderer extends Renderer { @InjectView(R.id.tv_chapter_title) TextView tv_chapter_title; @InjectView(R.id.tv_chapter_publish_date) TextView tv_chapter_publish_date; - @Inject - public ChapterRenderer() { + @Inject public ChapterRenderer() { } private int position; @@ -50,23 +49,19 @@ public void setPosition(int position) { this.position = position; } - @Override - protected void setUpView(View view) { + @Override protected void setUpView(View view) { ButterKnife.inject(this, view); } - @Override - protected void hookListeners(View view) { + @Override protected void hookListeners(View view) { //Empty because we are using ButterKnife to inject views. } - @Override - protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) { + @Override protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) { return layoutInflater.inflate(R.layout.row_chapter, viewGroup, false); } - @Override - public void render() { + @Override public void render() { Chapter chapter = getContent(); renderChapterNumber(); renderChapterTitle(chapter); diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 33ae003..d74360c 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -3,6 +3,11 @@ "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> + + + + @@ -39,9 +44,6 @@ - - - @@ -61,10 +63,7 @@ - - - - + @@ -111,7 +110,6 @@ -