Commit Graph

37 Commits

Author SHA1 Message Date
Julian Dolby b2503628a4 1) a bit more source mappimg information
2) fixes to how Contexts are combined
2018-10-13 08:42:08 -04:00
Julian Dolby e599d58cd7 Merge branch 'master' of https://github.com/wala/WALA 2017-08-16 14:50:12 -04:00
Ben Liblit b70d69d62f Treat many Eclipse plugin-related problems as errors
These are all problems that Eclipse can detect, but that it detects no
instances of right now.  Treating these as warnings instead of errors
should help prevent us from slipping backward in the future.
2017-08-16 11:36:46 -07:00
Julian Dolby a92b881c22 Merge branch 'master' of https://github.com/wala/WALA 2017-08-15 12:39:27 -04:00
Julian Dolby 6431cbeb60 java 8 2017-08-15 12:39:19 -04:00
Ben Liblit 5bcc985069 Tidy up some code that performs unchecked casts to a generic type 2017-08-15 09:16:59 -07:00
Ben Liblit bb6be21e2d Fix remaining "unlikely argument type" warnings from Eclipse Oxygen
Each of these required careful consideration of what the original
developer *intended* as distinguished from what the developer's code
actually *does*.  I believe I got each one right, and WALA's
regression tests agree.  A second opinion by a core WALA developer
would be welcome, though.
2017-08-15 09:16:14 -07:00
Ben Liblit d3c4200bc3 Disable Eclipse warnings about name shadowing
Previously we had 242 such warnings.  That large number suggests that
the WALA developers consider this to be an acceptable coding style.
If that's so, then it's better to hide these warnings rather than keep
them around as a perpetual distraction.
2017-07-18 20:43:36 -07:00
Ben Liblit 1d27ca974b Upgrade raw-types-usage warnings to errors where possible
In general, these diagnostics are now errors in projects for which all
such warnings have been fixed.  There are three unfixed warnings in
two projects, so this diagnostic remains a warning (not an error) in
those projects.

There are also many places where rwa-types-usage warnings have been
locally suppressed using @SuppressWarnings annotations.  I haven't
systematically revisited those to see if any can be fixed properly.
So for those projects this diagnostic must also remain a warning (not
an error), since @SuppressWarnings does not work on things Eclipse is
configured to treat as errors.
2017-07-12 10:39:06 -07:00
Ben Liblit 0bbe9970c6 Enable Eclipse Oxygen's new "unlikely argument types" diagnostics
There are two such diagnostics: one for collection methods and one for
equals().  See
<https://www.eclipse.org/eclipse/news/4.7/jdt.php#unlikely-argument-types>
for more information about these two new diagnostics.

For each of these diagnostics, I've set the severity level to
"warning" in projects that have some instances of the suspicious code,
or to "error" in projects that have no instances of the suspicious
code.
2017-07-08 13:22:00 -07:00
Ben Liblit 3187d09c1f Roll some diagnostics back to ignore instead of warning or error
These should mostly be things that we've already decided earlier that
we explicitly don't want to "fix" because they simply disagree with
the WALA project's coding style.
2017-06-26 11:16:09 -07:00
Ben Liblit fb9042d3a6 Activate more Eclipse diagnostics, and treat many warnings as errors
The additional diagnostics are ones that were previously being
ignored, but which we seem to have been ignoring by default rather
than as a conscious choice.

For diagnostics of which we currently have *zero* instances, treat
these as errors rather than merely warnings.  The intent is to
permanently lock out future regressions of things we've completely
fixed.  In the future, whenever we fix the last instance of a given
warning in a given Eclipse project, we should also promote that
diagnostic to an error to keep things clean into the future.
2017-06-26 11:16:09 -07:00
Ben Liblit e1d2fa9850 Suppress Eclipse warnings about potentially-static methods
The "potentially" qualifier is here because these methods are visible
outside the WALA source tree.  These methods may seem OK to be static
based on the code we have here, but we have no way of knowing whether
third-party code expected to be able to subclass and override.  I'm
going to play it safe and assume that we want to allow that.

Note that we are still allowing Eclipse warnings about methods that
can *definitely* be declared static; a different configuration option
controls these.  For private methods, final methods, and methods in
final classes, if the code seems static-safe based on what we have
here, then that's good enough: we don't need to worry about
third-party overrides.
2017-06-07 08:29:23 -07:00
Ben Liblit d35e8d0fa2 Disable Eclipse warnings about missing version constraints
Specifically, we're turning off Eclipse warnings about missing version
constraints on required bundles ("Require-Bundle"), exported
packages ("Export-Package"), and imported packages ("Import-Package").
We're not turning these off absolutely everywhere, though: only in
packages where one or more such warnings were actually being reported.
So if a given package was already providing all version constraints
for, say, package imports, then we've kept that warning on in that
package.

Honestly I don't entirely understand the practical implications of
these warnings.  However, there were 355 of them across many WALA
subprojects.  I take this as evidence that the WALA developers do not
consider these version constraints to be important.  Therefore, we may
as well stop warning about something we have no intention of fixing.

That being said, if we *do* want to fix some or all of these, I
welcome any advice on what those fixes should look like.  I am rather
ignorant about all things OSGi.
2017-03-28 20:37:41 -05:00
Ben Liblit 522c382a19 Use consistent Java versions, usually 1.7
Previously, the various Eclipse projects' Java configurations used
mixtures of 1.6, 1.7, and 1.8.  Many were internally inconsistent,
such as requiring 1.7 in "MANIFEST.MF" but 1.6 in the Eclipse JDT
build preferences.  The Travis-CI configuration tests against both 1.7
and 1.8, but does not test against 1.6.

Across all projects, the most common version was 1.7.  So I'm going to
assume that 1.7 is the intended build target.  This commit makes 1.7
the selected version nearly everywhere.

"com.ibm.wala.core.testdata" is the one exception.  This specific
project uses a few features only found in 1.8, such as lambda
expressions.  Previously, "com.ibm.wala.core.testdata" used 1.7 in
some aspects of its configuration but 1.8 in others.  Now it
consistently targets 1.8.  I wish this one project didn't need to be
inconsistent with the rest of WALA, but at least now it's consistent
with itself.

(Personally, I'd be happy to target 1.8 only.  But my impression
across all of these configuration files is that the WALA developers
still want to be compatible with 1.7.  If that is no longer a
requirement, let me know and I will adjust these changes accordingly
to target 1.8 only.)

This change eliminates 11 "There is no 'jre.compilation.profile' build
entry and the project has Java compliance preferences set" warnings
and 13 "The JRE container on the classpath is not a perfect match to
the 'JavaSE-1.7' execution environment" warnings.  However, it also
adds 450 "Redundant specification of type arguments <...>" warnings
and 17 "Resource '...' should be managed by try-with-resource"
warnings.  So this seems like a net step backward in my wish to reduce
WALA warnings.  However, those new warnings concern Java 1.7 language
features that we were not previously using to good effect in projects
that targeted 1.6.  If we all agree that we can now target 1.7
instead, then we can use these helpful features as the newly-added
warnings suggest.  So I call that a step in the right direction.
2016-11-29 21:29:30 -06:00
Ben Liblit 18b79bf0f9 Merge branch 'master' into warning-fixes-xml-validation 2016-11-29 10:08:00 -06:00
Ben Liblit 3b1547f0a7 Exclude Maven-generated (?) files from XML validation
I think the "target/p2artifacts.xml" and "target/p2content.xml" files
are generated by Maven.  They are well-formed XML but Eclipse's XML
validator legitimately warns that they lack grammar constraints.
Since we're not maintaining the tool that creates these files, we are
not in a position to do anything about that.  Therefore, we may as
well exclude these from validation entirely.  That way we can
more-clearly recognize warnings that we *can* do something about.
2016-11-28 14:55:25 -06:00
Ben Liblit 94f6933ff1 Exclude JUnit test result files from XML validation
As created by Tycho Surefire, these files are XML documents without
DTD or XML Schema declarations.  The XML validator warns about this
omission.  However, Surefire is not a WALA component.  We are not in a
suitable position to change it to include XML schema or DTD
declarations in the XML files it generates.  Better, then, to ignore
this benign problem so we can focus on warnings that we can act on
directly.
2016-11-28 12:42:30 -06:00
Ben Liblit 2a5503b9aa Exclude Maven-generated HTML pages from validation
Eclipse validation warns about invalid HTML content in all
Maven-generated "target/site/dependency-convergence.html" files.  The
warnings are legitimate: these HTML files are indeed invalid.
However, we don't maintain the tool that generates these files, so we
are not in a position to fix them.  Better, therefore, to suppress
these warnings so that we can notice and fix other problems over which
we do have control.
2016-11-27 21:24:03 -06:00
Ben Liblit dace7b709f Ignore missing non-null-by-default annotations in Eclipse
In general, the WALA code base is not really ready for nullness
checking.  It would be nice if we got there some day, but I'm not
planning to take that on now or any time soon.  Until then, it's not
useful to warn about missing @NonNullByDefault declarations on WALA
packages.

See also older commit 7b6811b.
2016-11-26 18:47:35 -06:00
Manu Sridharan 00eb1d2bd2 Set all projects to build against Java 6; no semantic change. Fixes #20 2013-04-10 16:01:27 -07:00
Manu Sridharan 56f3d847a5 more conversion to Unix line endings 2012-09-04 15:59:50 -07:00
sjfink 3a49f17ebc update code formatting for Eclipse 3.6
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4048 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-02-03 15:14:47 +00:00
msridhar1 5fd0909a7d changed execution environment to J2SE1.5. Fixed some warnings.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3113 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-02 17:01:50 +00:00
sjfink 66884c2c37 fix Eclipse 3.4.1 compiler warnings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3100 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-01 19:40:43 +00:00
sjfink a405e0666e tweak code format
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2947 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-07-04 01:56:52 +00:00
sjfink ee2fa39179 tweak code format
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2911 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-06-25 14:59:58 +00:00
sjfink 041d636139 tweak code format
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2364 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-11 16:50:38 +00:00
sjfink 4ed4b8a63d tweak code formatting for enums
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2341 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-10 16:26:32 +00:00
sjfink 9582754399 tweak code formatting template
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2265 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-03 16:31:21 +00:00
sjfink 65959dc4be revert code compliance level to 5.0
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2208 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-17 18:48:01 +00:00
sjfink 61a75149cf bump up source level to 6.0
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1852 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-10-11 14:26:04 +00:00
sjfink 52ee5e95a2 set compiler level to 5.0
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1841 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-10-11 13:43:45 +00:00
sjfink 7bef92b496 small cleanups relating to migration to Eclipse 3.3
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1360 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-05 23:56:32 +00:00
sjfink 1af957be03 share errors/warnings settings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1083 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-07 13:28:42 +00:00
sjfink bf89abb359 shared code formatter settings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1074 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-07 13:21:33 +00:00
sjfink fe94d20c11 enable project-specific compiler settings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1023 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-04-30 13:46:48 +00:00