Skip to content
Commits on Source (7)
......@@ -17,12 +17,34 @@
<filter-data value="src/org/jdesktop"/>
<filter-data value="src/org/openstreetmap/gui"/>
<filter-data value="src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen"/>
<filter-data value="src/org/tukaani"/>
<filter-data value=".externalToolBuilders"/>
<filter-data value=".settings"/>
<filter-data value=".svn"/>
<filter-data value="bin"/>
<filter-data value="bintest"/>
<filter-data value="build"/>
<filter-data value="build2"/>
<filter-data value="data"/>
<filter-data value="data_nodist"/>
<filter-data value="dist"/>
<filter-data value="eclipse"/>
<filter-data value="images"/>
<filter-data value="images_nodist"/>
<filter-data value="javadoc"/>
<filter-data value="linux"/>
<filter-data value="macosx"/>
<filter-data value="netbeans"/>
<filter-data value="patches"/>
<filter-data value="resources"/>
<filter-data value="styles"/>
<filter-data value="scripts"/>
<filter-data value="styles_nodist"/>
<filter-data value="test/build"/>
<filter-data value="test/config"/>
<filter-data value="test/data"/>
<filter-data value="test/lib"/>
<filter-data value="test/report"/>
<filter-data value="tools"/>
<filter-data value="windows"/>
</filter>
</fileset-config>
......@@ -83,35 +83,15 @@
<accessrule kind="discouraged" pattern="javafx/util/Duration"/>
</accessrules>
</classpathentry>
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="tools/pmd/commons-lang3-3.8.1.jar">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="tools/spotbugs/spotbugs-annotations.jar">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="tools/groovy/groovy-cli-commons-2.5.5.jar">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="tools/groovy/groovy-xml-2.5.5.jar">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -38,7 +38,6 @@
</buildSpec>
<natures>
<nature>org.sonarlint.eclipse.core.sonarlintNature</nature>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.sonar.ide.eclipse.core.sonarNature</nature>
<nature>sf.eclipse.javacc.javaccnature</nature>
......
eclipse.preferences.version=1
groovy.classpath.use.groovy,lib=false
eclipse.preferences.version=1
groovy.compiler.level=25
groovy.script.filters=**/*.dsld,y,**/*.gradle,n
......@@ -132,7 +132,7 @@ This is an overview of the files and directories in the JOSM code repository:
searches also for images with incompatible svg code
- optimize-images short script to decrease size of PNG images
- since_xxx.py developer tool to replace "@since xxx" in Javadoc by the upcoming revision number
- SyncEditorLayerIndex.groovy
- SyncEditorLayerIndex.java
script to compare and analyse the differences of the editor layer index and the
JOSM imagery list (see https://josm.openstreetmap.de/wiki/ImageryCompare)
- TagInfoExtract.java extracts tag information for the taginfo project
......@@ -153,11 +153,9 @@ This is an overview of the files and directories in the JOSM code repository:
- appbundler-1.0ea.jar used to build Mac OS X package
- checkstyle/ libs and config files for checkstyle (automatically detects code style
problems in source code); can be launched as an ant target in build.xml
- commons-cli-1.3.1.jar dependency of Groovy Ant task
- error_prone_ant.jar used to detect code errors during compilation
- spotbugs/ libs and config files for spotbugs (automatically detects common bugs and potential
problems in source code); can be launched as an ant target in build.xml
- groovy-all.jar used for some unit tests and various scripts
- jacocoant.jar used to include coverage data into JUnit test reports
- japicc/ used to generate a compatibility report between optimized jar and normal one
- javacc.jar used in the build process to generate some .java files from a javacc source file
......
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="trunk"
revision="15031">
revision="15150"
kind="dir">
<url>https://josm.openstreetmap.de/svn/trunk</url>
<relative-url>^/trunk</relative-url>
<repository>
......@@ -11,9 +11,9 @@
<uuid>0c6e7542-c601-0410-84e7-c038aed88b3b</uuid>
</repository>
<commit
revision="15031">
revision="15150">
<author>Don-vip</author>
<date>2019-04-28T02:36:41.370825Z</date>
<date>2019-06-01T21:08:04.930238Z</date>
</commit>
</entry>
</info>
......@@ -37,7 +37,7 @@
<property name="javacc.home" location="${tools.dir}"/>
<property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
<property name="proj-build.dir" location="${base.dir}/build2"/>
<property name="taginfo-build.dir" location="${base.dir}/build2"/>
<property name="script-build.dir" location="${base.dir}/build2"/>
<property name="checkstyle-build.dir" location="${base.dir}/build2"/>
<property name="epsg.output" location="${base.dir}/data/projection/custom-epsg"/>
<property name="error_prone_core.jar" location="${tools.dir}/error_prone_core.jar"/>
......@@ -46,6 +46,7 @@
<property name="javacutil.jar" location="${tools.dir}/javacutil.jar"/>
<property name="failureaccess.jar" location="${tools.dir}/failureaccess.jar"/>
<property name="guava.jar" location="${tools.dir}/guava.jar"/>
<property name="commons-lang3.jar" location="${pmd.dir}/commons-lang3-3.8.1.jar"/>
<property name="jformatstring.jar" location="${spotbugs.dir}/jFormatString-3.0.0.jar"/>
<property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
<property name="dist-optimized.jar" location="${dist.dir}/josm-custom-optimized.jar"/>
......@@ -55,6 +56,8 @@
<property name="jacoco.inclbootstrapclasses" value="false" />
<property name="jacoco.inclnolocationclasses" value="false" />
<property name="junit.printsummary" value="on" />
<property name="default-junit-includes" value="**/*Test.class"/>
<property name="default-junitIT-includes" value="**/*TestIT.class"/>
<!-- build parameter: compression level (ant -Dclevel=N)
N ranges from 0 (no compression) to 9 (maximum compression)
default: 9 -->
......@@ -76,11 +79,6 @@
<condition property="java.library.dir" value="jmods" else="lib">
<isset property="isJava9"/>
</condition>
<path id="groovy.classpath">
<fileset dir="${tools.dir}/groovy">
<include name="*.jar"/>
</fileset>
</path>
<path id="test.classpath">
<fileset dir="${test.dir}/lib">
<include name="**/*.jar"/>
......@@ -88,7 +86,7 @@
<pathelement path="${dist.jar}"/>
<pathelement path="${failureaccess.jar}"/>
<pathelement path="${guava.jar}"/>
<pathelement path="${pmd.dir}/commons-lang3-3.8.1.jar"/>
<pathelement path="${commons-lang3.jar}"/>
<pathelement path="${spotbugs.dir}/spotbugs-annotations.jar"/>
</path>
<path id="pmd.classpath">
......@@ -411,7 +409,8 @@ Build-Date: ${build.tstamp}
private="true"
linksource="true"
author="false">
<link href="https://docs.oracle.com/javase/8/docs/api"/>
<link href="https://docs.oracle.com/javase/8/docs/api" unless:set="isJava11" />
<link href="https://docs.oracle.com/en/java/javase/11/docs/api" if:set="isJava11" />
<doctitle><![CDATA[<h2>JOSM - Javadoc</h2>]]></doctitle>
<bottom><![CDATA[<a href="https://josm.openstreetmap.de/">JOSM</a>]]></bottom>
<arg value="-html5" if:set="isJava9" />
......@@ -427,6 +426,7 @@ Build-Date: ${build.tstamp}
<target name="clean" depends="init-properties">
<delete dir="${build.dir}"/>
<delete dir="${proj-build.dir}"/>
<delete dir="${script-build.dir}"/>
<delete dir="${checkstyle-build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${mapcss.dir}/parsergen"/>
......@@ -501,6 +501,8 @@ Build-Date: ${build.tstamp}
<attribute name="testfamily"/>
<attribute name="testITsuffix" default=""/>
<attribute name="coverage" default="${coverageByDefault}"/>
<attribute name="includes" default="${default-junit@{testITsuffix}-includes}"/>
<attribute name="excludes" default="${default-junit@{testITsuffix}-excludes}"/>
<sequential>
<echo message="Running @{testfamily}@{testITsuffix} tests with JUnit"/>
<jacoco:coverage destfile="${test.dir}/jacoco@{testITsuffix}.exec" enabled="@{coverage}" includes="${jacoco.includes}"
......@@ -548,7 +550,7 @@ Build-Date: ${build.tstamp}
<formatter type="plain"/>
<formatter type="xml"/>
<batchtest fork="yes" todir="${test.dir}/report">
<fileset dir="${test.dir}/build/@{testfamily}" includes="**/*Test@{testITsuffix}.class"/>
<fileset dir="${test.dir}/build/@{testfamily}" includes="@{includes}" excludes="@{excludes}"/>
</batchtest>
</junit>
</jacoco:coverage>
......@@ -837,11 +839,16 @@ Build-Date: ${build.tstamp}
</as:check-signature>
</target>
<target name="taginfo-compile" depends="dist">
<javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true" includes="TagInfoExtract.java"
destdir="${taginfo-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
includeantruntime="false" createMissingPackageInfoClass="false"
encoding="UTF-8" classpath="${build.dir}">
<target name="script-compile" depends="dist, test-compile">
<javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true" includes="*.java"
destdir="${script-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
<classpath>
<pathelement path="${build.dir}"/>
<pathelement path="${test.dir}/build/unit"/>
<pathelement path="${guava.jar}"/>
<pathelement path="${commons-lang3.jar}"/>
</classpath>
</javac>
</target>
......@@ -854,7 +861,9 @@ Build-Date: ${build.tstamp}
<sysproperty key="java.awt.headless" value="true"/>
<classpath>
<pathelement path="${dist.jar}"/>
<pathelement path="${taginfo-build.dir}"/>
<pathelement path="${script-build.dir}"/>
<pathelement path="${guava.jar}"/>
<pathelement path="${commons-lang3.jar}"/>
</classpath>
<arg value="--type"/>
<arg value="@{type}"/>
......@@ -867,22 +876,27 @@ Build-Date: ${build.tstamp}
</sequential>
</macrodef>
<target name="taginfo" depends="taginfo-compile">
<target name="taginfo" depends="script-compile">
<_taginfo type="mappaint" output="taginfo_style.json"/>
<_taginfo type="presets" output="taginfo_presets.json"/>
<_taginfo type="external_presets" output="taginfo_external_presets.json"/>
</target>
<target name="imageryindex" depends="init-properties">
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="groovy.classpath"/>
<target name="imageryindex" depends="init-properties,script-compile">
<echo message="Checking editor imagery difference"/>
<groovy src="scripts/SyncEditorLayerIndex.groovy" classpath="${dist.jar}">
<arg value="-noeli"/>
<java classname="SyncEditorLayerIndex" failonerror="true" fork="false">
<classpath>
<pathelement path="${dist.jar}"/>
<pathelement path="${script-build.dir}"/>
<pathelement path="${guava.jar}"/>
<pathelement path="${commons-lang3.jar}"/>
</classpath>
<arg value="--noeli"/>
<arg value="-p"/>
<arg value="imagery_eliout.imagery.xml"/>
<arg value="-q"/>
<arg value="imagery_josmout.imagery.xml"/>
</groovy>
</java>
</target>
<target name="imageryindexdownload">
......
This diff is collapsed.
......@@ -26,7 +26,10 @@ way[addr:interpolation] {
}
/* #17486 */
*[addr:housenumber][addr:housenumber!~/[0-9]/] {
*[addr:housenumber=bb][inside("BA")] {
set ok_housenumber;
}
*[addr:housenumber][addr:housenumber!~/[0-9]/]!.ok_housenumber {
throwWarning: tr("{0} without number", "{0.key}");
assertNoMatch: "way addr:housenumber=0";
assertNoMatch: "way addr:housenumber=5a";
......
......@@ -117,6 +117,7 @@ way[waterway=pressurised ][tunnel!=flooded][man_made!=pipeline] {
}
/* {0.tag} without {1.key} (warning level) */
node[actuator=manual][!handle],
node[emergency=fire_hydrant][!fire_hydrant:type],
way[ boundary=administrative][!admin_level],
relation[boundary=administrative][!admin_level],
......@@ -222,7 +223,11 @@ way[incline ][!highway][!railway][aeroway!~/^(runway|taxiway)
group: tr("missing tag");
}
/* {0.tag} together with {1.key}, see #16464, #10837, #14034, #9389, #11977, #13156, #16888 */
/* {0.tag} together with {1.key}, see #17664, #17707, #16464, #10837, #14034, #9389, #11977, #13156, #16888 */
*[power=plant][/^generator:/],
*[power=generator][/^plant:/],
*[power=plant][voltage],
*[power=plant][frequency],
*[internet_access=no][internet_access:fee],
node[power=transformer][voltage],
node[transformer=distribution][voltage][power=pole],
......@@ -234,6 +239,8 @@ way[oneway=-1 ][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidep
way[oneway=-1 ][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][oneway:bicycle!=no][oneway:psv!=no] {
throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
group: tr("suspicious tag combination");
assertMatch: "way power=plant generator:source=wind";
assertMatch: "way power=generator plant:source=combustion";
}
/* {0.tag} together with {1.tag} (info level), see #9696 */
......@@ -242,7 +249,8 @@ way[highway=footway][oneway=no] {
group: tr("suspicious tag combination");
}
/* {0.tag} together with {1.tag}, see #17592, #17594, #17542, #16861, #16147, #10186 */
/* {0.tag} together with {1.tag}, see #17623, #17592, #17594, #17542, #16861, #16147, #10186 */
way[junction=yes][highway],
way[tracktype=grade1][surface][surface=~/^(unpaved|compacted|gravel|fine_gravel|pebblestone|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$/],
way[tracktype=grade2][surface][surface=~/^(sand|mud)$/],
way[segregated][bicycle=no],
......@@ -577,3 +585,9 @@ way[highway=pedestrian][width][width<3] {
assertNoMatch: "way highway=pedestrian width=3";
assertNoMatch: "way highway=pedestrian width=5.5";
}
/* see #17623 */
way:areaStyle[highway][highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service$|living_street|pedestrian|track|path|footway|cycleway|bus_guideway|bridleway/][area!=yes] {
throwOther: tr("A linear object {0} without {1} has a tag indicating that it is an area.", "{1.tag}", "{3.tag}");
group: tr("suspicious tag combination");
}
\ No newline at end of file
......@@ -1433,3 +1433,12 @@ way[/^is_in:.*$/] {
suggestAlternative: "sport=gaelic_games";
group: tr("deprecated tagging");
}
/* #17556 */
*[leisure=common] {
throwWarning: tr("{0} is deprecated", "{0.tag}");
suggestAlternative: "landuse=*";
suggestAlternative: "leisure=*";
suggestAlternative: "designation=common";
group: tr("deprecated tagging");
}
\ No newline at end of file
......@@ -142,8 +142,8 @@ way[highway][area!=yes][!tunnel][!covered] >[index=1] node,
way[highway][area!=yes][!tunnel][!covered] >[index=-1] node {
set first_last_highway_node;
}
way[building][building!=no] > node.node_in_closed_highway,
way[building][building!=no] > node.node_in_highway!.first_last_highway_node {
way[building][building!=no] > node[!entrance].node_in_closed_highway,
way[building][building!=no] > node[!entrance].node_in_highway!.first_last_highway_node {
throwWarning: tr("node connects highway and building");
}
......@@ -161,7 +161,7 @@ node[source:geometry] {
/* Building inside building (spatial test) */
*[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] ∈
*[building][building!~/no|entrance/] {
area[building][building!~/no|entrance/] {
throwWarning: tr("Building inside building");
}
......@@ -181,7 +181,7 @@ area:closed:areaStyle ⧉ area:closed:areaStyle {
}
/* see ticket #9311 */
node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] ∈ *[amenity=parking] {
node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] ∈ area[amenity=parking] {
throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
group: tr("{0} inside {1}", "amenity", "amenity");
}
......@@ -196,23 +196,23 @@ area:closed:areaStyle[landuse!=residential][tag("landuse") = parent_tag("landuse
}
/* see ticket:#9522 */
node[tag("amenity") = parent_tag("amenity")] ∈ *[amenity][amenity != parking] {
node[tag("amenity") = parent_tag("amenity")] ∈ area[amenity][amenity != parking] {
throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
group: tr("{0} inside {1}", "amenity", "amenity");
}
node[tag("leisure") = parent_tag("leisure")] ∈ *[leisure] {
node[tag("leisure") = parent_tag("leisure")] ∈ area[leisure] {
throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
group: tr("{0} inside {1}", "leisure", "leisure");
}
node[tag("tourism") = parent_tag("tourism")] ∈ *[tourism] {
node[tag("tourism") = parent_tag("tourism")] ∈ area[tourism] {
throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
group: tr("{0} inside {1}", "tourism", "tourism");
}
node[tag("shop") = parent_tag("shop")] ∈ *[shop] {
node[tag("shop") = parent_tag("shop")] ∈ area[shop] {
throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
group: tr("{0} inside {1}", "shop", "shop");
}
node[tag("power") = parent_tag("power")] ∈ *[power] {
node[tag("power") = parent_tag("power")] ∈ area[power] {
throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
group: tr("{0} inside {1}", "power", "power");
}
......
......@@ -171,6 +171,7 @@ K:locality=townland
K:place=allotments
K:place=city_block
K:place=plot
K:building=bank
K:building=bunker
K:building=chalet
K:building=civic
......@@ -359,6 +360,7 @@ K:power=sub_station
K:product=wine
K:railway=derail
K:railway=radio
K:resource=peat
K:resource=sand
K:shop=trade
K:sidewalk=none
......@@ -378,3 +380,4 @@ K:highway=corridor
K:historic=citywalls
K:crossing=zebra
K:healthcare=dentist
K:golf=cartpath
......@@ -90,7 +90,8 @@ node[emergency=fire_hydrant][fire_hydrant:count=1] {
fixRemove: "{1.key}";
}
/* #17100, #17471, #17629 */
/* #17100, #17471, #17629, #17633 */
*[name][name=~/^(?i)(parc|park)$/][leisure=park],
*[name][name=~/^(?i)(pond)$/][water=pond],
*[name][name=~/^(?i)(chapel|chapelle|kapelle)$/][building=chapel],
*[name][name=~/^(?i)(church|église|biserica)$/][amenity=place_of_worship][religion=christian],
......@@ -112,6 +113,7 @@ node[emergency=fire_hydrant][fire_hydrant:count=1] {
*[name][name=~/^(?i)(cemetery|cementerio|cimetière|cmentarz|friedhof)$/][landuse=cemetery],
*[name][name=~/^(?i)(mairie|rathaus)$/][amenity=townhall],
*[name][name=~/^(?i)(monument aux morts|war memorial)$/][historic=memorial][memorial=war_memorial],
*[name][name=~/^(?i)(school|école|Школа)$/][building=school],
*[name][name=~/^(?i)(school|école|Школа)$/][amenity=school],
*[name][name=~/^(?i)(école élémentaire)$/][amenity=school]["school:FR"="élémentaire"],
*[name][name=~/^(?i)(école maternelle)$/][amenity=school]["school:FR"="maternelle"],
......@@ -150,6 +152,7 @@ node[emergency=fire_hydrant][fire_hydrant:count=1] {
assertMatch: "way name=Cmentarz amenity=grave_yard";
assertNoMatch: "way name=kiosk amenity=grave_yard";
}
*[name][name=~/^(?i)(school|école|Школа)$/][building][building!=school][building!=no],
*[name][name=~/^(?i)(house|casa|rumah|vivienda)$/][building][building!=house][building!=no] {
throwWarning: tr("{0}", "{0.tag}");
group: tr("descriptive name");
......
......@@ -47,7 +47,7 @@
}
*[wikipedia =~ /(?i)^[-a-z]{2,12}:.*%[0-9A-F][0-9A-F]/] {
throwError: tr("{0} tag should not have URL-encoded values like ''%27''", "{0.tag}");
throwError: tr("{0} tag should not have URL-encoded values like ''%27''", "{0.key}");
fixAdd: concat("wikipedia=", get(regexp_match("(?i)^([-a-z]+:)(.*)$", tag("wikipedia")),1), trim(replace(URL_decode(get(regexp_match("(?i)^([-a-z]+:)(.+)$", tag("wikipedia")),2)), "_", " ")));
assertMatch: "node wikipedia=en:Foo%27s";
assertNoMatch: "node wikipedia=en:Foo";
......