-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SAT NoEmptyLineSeparatorCheck findings #7296
Fix SAT NoEmptyLineSeparatorCheck findings #7296
Conversation
Signed-off-by: Wouter Born <github@maindrain.net>
allChannels | ||
.add(getCallback().createChannelBuilder(new ChannelUID(getThing().getUID(), CHANNEL_NOWPLAYING_ALBUM), | ||
new ChannelTypeUID(BINDING_ID, CHANNEL_NOWPLAYING_ALBUM)).build()); | ||
allChannels | ||
.add(getCallback().createChannelBuilder(new ChannelUID(getThing().getUID(), CHANNEL_NOWPLAYING_ARTWORK), | ||
new ChannelTypeUID(BINDING_ID, CHANNEL_NOWPLAYING_ARTWORK)).build()); | ||
allChannels | ||
.add(getCallback().createChannelBuilder(new ChannelUID(getThing().getUID(), CHANNEL_NOWPLAYING_ARTIST), | ||
new ChannelTypeUID(BINDING_ID, CHANNEL_NOWPLAYING_ARTIST)).build()); | ||
allChannels.add( | ||
getCallback().createChannelBuilder(new ChannelUID(getThing().getUID(), CHANNEL_NOWPLAYING_DESCRIPTION), | ||
new ChannelTypeUID(BINDING_ID, CHANNEL_NOWPLAYING_DESCRIPTION)).build()); | ||
allChannels | ||
.add(getCallback().createChannelBuilder(new ChannelUID(getThing().getUID(), CHANNEL_NOWPLAYING_GENRE), | ||
new ChannelTypeUID(BINDING_ID, CHANNEL_NOWPLAYING_GENRE)).build()); | ||
allChannels.add( | ||
getCallback().createChannelBuilder(new ChannelUID(getThing().getUID(), CHANNEL_NOWPLAYING_ITEMNAME), | ||
new ChannelTypeUID(BINDING_ID, CHANNEL_NOWPLAYING_ITEMNAME)).build()); | ||
allChannels.add(getCallback() | ||
.createChannelBuilder(new ChannelUID(getThing().getUID(), CHANNEL_NOWPLAYING_STATIONLOCATION), | ||
new ChannelTypeUID(BINDING_ID, CHANNEL_NOWPLAYING_STATIONLOCATION)) | ||
.build()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any formatting setting that would make this look better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed the part where it's sloppy code with a lot of unnecessary duplication causing all sorts of issues.
Math.min(Math.max(0, ((DecimalType) command).intValue()*10), 999999999)), this); | ||
Math.min(Math.max(0, ((DecimalType) command).intValue() * 10), 999999999)), | ||
this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's with this new indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Eclipse auto save formatting placed it on a new line. Does it also happen for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind that it placed it on a new line, I just disagree on the indentation of that new line, it should be at least as indented as the previous one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -28,7 +28,7 @@ | |||
import org.eclipse.smarthome.core.thing.binding.BaseBridgeHandler; | |||
import org.eclipse.smarthome.core.thing.binding.ThingHandler; | |||
import org.eclipse.smarthome.core.types.Command; | |||
|
|||
import org.openhab.binding.neohub.internal.NeoHubBindingConstants.NeoHubReturnResult; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this imported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's added by the auto save actions because it's used by fromNeoHubFetchPollingResponse
on L181.
@@ -76,7 +76,8 @@ public XMLConnection(String host) { | |||
connection.setRequestMethod("POST"); | |||
connection.setRequestProperty("Content-Length", Integer.toString(message.length())); | |||
|
|||
connection.setConnectTimeout(CONNECTION_TIMEOUT_MS); // set a timeout in case the device is not reachable (went offline) | |||
connection.setConnectTimeout(CONNECTION_TIMEOUT_MS); // set a timeout in case the device is not reachable | |||
// (went offline) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this comment indentation fragile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be less fragile now. 🎈
Signed-off-by: Wouter Born <github@maindrain.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving Satel changes.
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: Eugen Freiter <freiter@gmx.de>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: CSchlipp <christian@schlipp.de>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
* Fix SAT NoEmptyLineSeparatorCheck findings * Fix sloppy coding and fragile comment Signed-off-by: Wouter Born <github@maindrain.net>
Removes unnecessary empty lines and two unnecessary default constructors.