Skip to content

Commit 69940b9

Browse files
committed
Initial implementation
1 parent f21831d commit 69940b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3231
-2
lines changed

.github/renovate.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>cucumber/renovate-config",
5+
"github>cucumber/renovate-config:messages-range-strategy-widen"
6+
]
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release GitHub
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
create-github-release:
9+
name: Create GitHub Release and Git tag
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v5
16+
- uses: cucumber/action-create-github-release@v1.1.1
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-mvn.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release Maven
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
publish-mvn:
9+
name: Publish Maven Package
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
steps:
13+
- uses: actions/checkout@v5
14+
- uses: actions/setup-java@v5
15+
with:
16+
distribution: 'temurin'
17+
java-version: '17'
18+
cache: 'maven'
19+
- uses: cucumber/action-publish-mvn@v3.0.0
20+
with:
21+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
22+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
23+
nexus-username: ${{ secrets.SONATYPE_USERNAME }}
24+
nexus-password: ${{ secrets.SONATYPE_PASSWORD }}
25+
working-directory: java

.github/workflows/test-java.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test-java
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- renovate/**
8+
paths:
9+
- java/**
10+
- testdata/**
11+
- .github/**
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- java/**
17+
- testdata/**
18+
- .github/**
19+
workflow_call:
20+
21+
jobs:
22+
test-java:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: true
26+
matrix:
27+
os:
28+
- ubuntu-latest
29+
java: ['17', '21']
30+
31+
steps:
32+
- uses: actions/checkout@v5
33+
34+
- uses: actions/setup-java@v5
35+
with:
36+
distribution: 'temurin'
37+
java-version: ${{ matrix.java }}
38+
cache: 'maven'
39+
40+
- run: mvn verify
41+
working-directory: java
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: test-testdata
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- testdata/**
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- testdata/**
14+
15+
jobs:
16+
test-testdata:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
21+
- uses: actions/checkout@v5
22+
23+
- uses: actions/setup-node@v5
24+
with:
25+
cache: 'npm'
26+
cache-dependency-path: testdata/package-lock.json
27+
28+
- run: npm ci
29+
working-directory: testdata
30+
31+
- name: check repository is not dirty
32+
run: "[[ -z $(git status --porcelain) ]]"
33+
34+
- name: show diff
35+
if: ${{ failure() }}
36+
run: git status --porcelain

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea/
2+
*.iml

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The formatter is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
### Added
10+
- Java implementation ([#1](https://github.com/cucumber/pretty-formatter/pull/1) M.P. Korstanje)
11+
12+
[Unreleased]: https://github.com/cucumber/pretty-formatter/compare/f21831df98c5e57a53950a92b068df8321e45bce...HEAD

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
# usage-formatter
2-
Prints usage statatistics for step definitions
1+
# Usage Formatter
2+
⚠️ This is an internal package; you don't need to install it in order to use the JSON Formatter.
3+
4+
[![Maven Central](https://img.shields.io/maven-central/v/io.cucumber/cucumber-json-formatter.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:io.cucumber%20AND%20a:cucumber-json-formatter)
5+
6+
Writes usage statistics for step definitions
7+
8+
## Features
9+
10+
TODO:
11+
12+
## Contributing
13+
14+
Each language implementation validates itself against the examples in the
15+
`testdata` folder. See the [testdata/README.md](testdata/README.md) for more
16+
information.

java/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea/
2+
*.iml
3+
target/
4+
pom.xml.versionsBackup

java/pom.xml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>io.cucumber</groupId>
7+
<artifactId>cucumber-parent</artifactId>
8+
<version>4.4.0</version>
9+
</parent>
10+
11+
<artifactId>pretty-formatter</artifactId>
12+
<version>0.0.1-SNAPSHOT</version>
13+
<packaging>jar</packaging>
14+
<name>Usage Formatter</name>
15+
<description>Writes usage statistics for step definitions</description>
16+
<url>https://github.com/cucumber/usage-formatter</url>
17+
18+
<properties>
19+
<project.Automatic-Module-Name>io.cucumber.usageformatter</project.Automatic-Module-Name>
20+
<project.build.outputTimestamp>1758245480</project.build.outputTimestamp>
21+
</properties>
22+
23+
<scm>
24+
<connection>scm:git:git://github.com/cucumber/usage-formatter.git</connection>
25+
<developerConnection>scm:git:git@github.com:cucumber/usage-formatter.git</developerConnection>
26+
<url>git://github.com/cucumber/usage-formatter.git</url>
27+
<tag>HEAD</tag>
28+
</scm>
29+
30+
<dependencyManagement>
31+
<dependencies>
32+
<dependency>
33+
<groupId>org.junit</groupId>
34+
<artifactId>junit-bom</artifactId>
35+
<version>6.0.0</version>
36+
<type>pom</type>
37+
<scope>import</scope>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>com.fasterxml.jackson</groupId>
42+
<artifactId>jackson-bom</artifactId>
43+
<version>2.20.0</version>
44+
<type>pom</type>
45+
<scope>import</scope>
46+
</dependency>
47+
48+
<dependency>
49+
<groupId>org.assertj</groupId>
50+
<artifactId>assertj-bom</artifactId>
51+
<version>3.27.6</version>
52+
<type>pom</type>
53+
<scope>import</scope>
54+
</dependency>
55+
</dependencies>
56+
</dependencyManagement>
57+
58+
<dependencies>
59+
<dependency>
60+
<groupId>io.cucumber</groupId>
61+
<artifactId>messages</artifactId>
62+
<version>[29.0.1,31.0.0)</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>io.cucumber</groupId>
66+
<artifactId>query</artifactId>
67+
<version>[14.3.0,15.0.0)</version>
68+
</dependency>
69+
70+
<dependency>
71+
<groupId>com.fasterxml.jackson.core</groupId>
72+
<artifactId>jackson-databind</artifactId>
73+
<scope>test</scope>
74+
</dependency>
75+
76+
<dependency>
77+
<groupId>com.fasterxml.jackson.datatype</groupId>
78+
<artifactId>jackson-datatype-jdk8</artifactId>
79+
<scope>test</scope>
80+
</dependency>
81+
82+
<dependency>
83+
<groupId>com.fasterxml.jackson.datatype</groupId>
84+
<artifactId>jackson-datatype-jsr310</artifactId>
85+
<scope>test</scope>
86+
</dependency>
87+
88+
<dependency>
89+
<groupId>com.fasterxml.jackson.module</groupId>
90+
<artifactId>jackson-module-parameter-names</artifactId>
91+
<scope>test</scope>
92+
</dependency>
93+
94+
<dependency>
95+
<groupId>org.assertj</groupId>
96+
<artifactId>assertj-core</artifactId>
97+
<scope>test</scope>
98+
</dependency>
99+
100+
<dependency>
101+
<groupId>org.junit.jupiter</groupId>
102+
<artifactId>junit-jupiter</artifactId>
103+
<scope>test</scope>
104+
</dependency>
105+
</dependencies>
106+
</project>

0 commit comments

Comments
 (0)