Showing posts with label issue. Show all posts
Showing posts with label issue. Show all posts

Tuesday, March 10, 2015

Syntactically parallel elements in indentation


Why it is matter ?

https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html#s4.5.1-line-wrapping-where-to-break
"The prime directive of line-wrapping is: prefer to break at a higher syntactic level."

https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html#s4.5.2-line-wrapping-indent
"When there are multiple continuation lines, indentation may be varied beyond +4 as desired. In general, two continuation lines use the same indentation level if and only if they begin with syntactically parallel elements."

Cases from real code with bad indentation:
1)

 if ((rcurly != null) && !level.accept(rcurlyPos)
           && (rcurlyMustStart() || startsLine(rcurly))
      && !areOnSameLine(rcurly, lcurly))


2)
details.append("Focused : ").append(file.getPath())
.append(", start date :")
.append(", end date : ");

3)
if (toVisitAst != null
&& (toVisitAst.getParent().getParent().getNextSibling() == null
|| toVisitAst.getParent().getParent().getNextSibling().getType()
== TokenTypes.RCURLY)
&& toVisitAst.getType() == TokenTypes.LITERAL_RETURN
&& toVisitAst.getParent().getNextSibling()== null) { }


===========================


resulted in https://github.com/checkstyle/checkstyle/issues/270

Wrong link generation by maven javadoc plugin for org.xml.sax.helpers.DefaultHandler

Saturday, February 15, 2014

New Check: Grammar in names and negative names restrictions

One more ambitions for Checkstyle - check grammar in method names and negative names restrictions.

Reason:
- developers do typos
- not all developers are good in English, and this nightmare to other team members who English by native
- Force developers to avoid negative name usage "isIncorrect()", "isNotIgnoredClass()"

Why negative name is bad approach - as it force to use that Negative Logic in other places.

Example:

Negative logic/name:
public boolean isNotCorrect() {...}

force other to have code like :
if (isNotCorrect())  // OK
if (!isNotCorrect())  // is NOT OK - it is unreadable!!!

So lets remove negative logic/name:
public boolean isCorrect() {...}

force other to have code like :
if (!isCorrect())  // it is OK
if (isCorrect())  // it is OK

BUT live is not that ideal sometime it is convenient to use negative logic or even more it is dependency from thirdparty code or legacy code.

That idea depends on grammar check in names base on vocabulary http://grammarist.com/usage/negative-prefixes/

we need options to check "boolean methods" "setter/getter" .... user might not need to test all names, option to check base on visibility - public/private/... .


http://www.liferay.com/community/wiki/-/wiki/Main/Javadoc+Guidelines#section-Javadoc+Guidelines-General+Guidelines , search for "Refer to parameters with "the", not "a" or "given"" - it will be good validation

Class: Initial and detailed description # "The first sentence of the initial class description starts with a verb (two verbs, in fact)."




If you run to this page and share idea with me, please let me know.

Thursday, January 23, 2014

How to change priority by filter in Zimbra web client

There is no such functionality in web client :(. But Zimbra support Priority setup, while composing, and display in mail list.

Please vote for issue against Zimbra web mail client: https://bugzilla.zimbra.com/show_bug.cgi?id=86080

Sunday, January 19, 2014

Proposals for Aqua mail-client android application

I use to have "Touchdown for smartphones" application to read mails for MSExchange mail server - perfect application and very customizable ! I loved it! But I moved to IMAP account and Touchdown does not support IMAP, so I have to switch from it to other application.

I did investigation of mail clients for Android and following application is really great and convenient for my workflow and usage.
Aqua mail client.

List of my proposals to make me forget about Touchdown:
1) New option: Do not mark Read on server.
2) How it is possible to filter UnRead mails in Folder
3) hide amount of mails in folder
4) new potion: hide Folder from list of synced Folders

Compress common part for project in Eclipse

Proposal to improve "Compress package names", list of features:

Compress package names: compress common part for project.

Monday, October 21, 2013

Checkstyle Check to detect System.out.println usage in java code

Examples of usage in code:
1.
import static java.lang.System.out;
...
out.println("hello!")

2.
System.out.println("hello");




Requirement:
- Analyse import for short name usage "import static java.lang.System.out;"

Possiblle name for Check: ForbidQualifierUsage

Options:
forbiddenFullQualifierNames : String List-  qualifier that we will search for (Example:"System.err.println")
ignoredClasses : Regex -  ignores (Example:"com.mycompany.console.Main")

Bad sides:
1) we can not distinguish methods by parameters so any user method with same name and without package usage will be false-positive if not all methods are investigated to detects overlap of static import in local declaration .

import static java.lang.System.setIn;


public static void setIn(InputStream in) {
    // just a method with similar signature that is compiled
    // if you comment out that method System.setIn will be used (tested in Intelij Idea)
}

public static void main(String... args) {
    setIn(null); // it is local if local method is defined
}

2) Any overloaded methods(same name but different parameters) will be false-positives or known limitations :) :

   System.out.println("hi", "hi")

https://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.5.3

It is permissible for one single-static-import declaration to import several fields or types with the same name, or several methods with the same name and signature. 
So JDK is OK with multiple imports by single static import, so overloaded identifiers are ok.


Resolution:
So it is not complete solution, kind of same level of false positives as RegExp search on code approach.
Could we close eyes on that false-positives?
do you have other ideas and proposal?
https://github.com/checkstyle/checkstyle/issues?q=is%3Aopen+is%3Aissue
Or discussion mail-list - https://groups.google.com/forum/#!forum/checkstyle-devel

Thursday, September 12, 2013

Github need to have search of files feature in repo

I will be lovely if Github create search in repo at least by file name (with support of matching by Camel case), it will be very useful during sources investigation. Developers always search for files, and gihub is not just a web hosting - it is online editor, and allow contribution to project without clone to local PC.

This feature exists - https://github.com/blog/793-introducing-the-file-finder just press "t" and search appear.

Tuesday, August 13, 2013

Krusader have problem with unpacking tag.gz

It is not a first time I noticed that after unzip/unarchive/unpacksome archive some files are missed. But when you do it from terminal or ubuntu befault archive manager - all works fine.

issue was reported: https://bugs.kde.org/show_bug.cgi?id=323472

Tuesday, April 9, 2013

Wednesday, November 14, 2012

Problem with switching LibeOffice windows by Alt+Tab and in vertical panel

Issue is open for this problem: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/844119
Please vote to raise importance of this bug.

Workaround suggested Matthias Niess in bug comments:

switching works fine if open SpreadSheet from Dash and then open files from Cntl+O.

as an option you can install LibreOffice4 from official site - but in this case you loose Unity integration of menu, (instructions for installation).

update:
looks like fixed in latest ubuntu updates (March 2013), I aslo updated Libreoffice to 4.0 by http://www.webupd8.org/2013/03/install-libreoffice-40-in-ubuntu-1204.html


sudo add-apt-repository ppa:libreoffice/libreoffice-4-0
sudo apt-get update

.... and do install from ubuntu Center, and now Libreoffice works fine.

Sunday, November 11, 2012

Change order of sections in Jenkins Sections View Plugin


We use "Section View Plugin"  to manage numerous configuration and group them to ease search and making a family of configurations.

List of all issues of this plugin.

My proposition:
JENKINS-15798 - Allow changing order for Sections in configuration.
Please vote if you have the same problem

Monday, November 5, 2012

Empathy problems in Ubuntu 12.04

1. Problem to be notified about new/missed message for Empathy.
Workaround:

2. When you quit from Empathy in launch panel, Empathy disappear from panel but still launching (see problem above to show it in tray top panel):

Tuesday, October 2, 2012

Thunderbird: Open link with different browser

I am just searching for convenient way to open links from Thunderbird in different Web browsers.

For FireFox there are good plugin Open With. I wish to have such addon in Thunderbird. I asked author   ... but no answer.

I in one year I searched the same problem and found a lot of requests/question for the same problem - :).

One of workaround that I use now - http://forums.opensuse.org/english/get-technical-help-here/applications/461076-how-do-i-get-thunderbird-open-links-google-chrome.html

Copy paste from this forum:

* Navigate to "Edit --> Preferences --> Advanced" in the Thunderbird menus and click on the "Config Editor" button.
    * Search for the following three entries:
          o network.protocol-handler.warn-external.http
          o network.protocol-handler.warn-external.https
          o network.protocol-handler.warn-external.ftp
    * Set the value of each of these three entries to true (you can do this by double-clicking on each entry, then close the "about:config" window and click "OK" on the "Thunderbird Preferences" window).