Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,47 @@ is being made):
4. **Find something to work on**: Browse the [issues](https://github.com/apache/ossie/issues), or raise a topic on the dev list.
5. **Submit a Pull Request**: Fork the repository, make your changes, and submit a pull request. All contributions go through the review process described below.

## Development Setup

### Python

The project uses [ruff](https://docs.astral.sh/ruff/) for linting and formatting
across all Python packages. A shared configuration lives in the top-level `ruff.toml`.

```bash
# Install ruff (if not already available)
pip install ruff

# Check for lint issues
make lint

# Auto-format code
make format

# Check formatting without modifying files
make format-check
```

**Optional: pre-commit hooks** — If you'd like automatic formatting on every commit:

```bash
pip install pre-commit
pre-commit install
```

This runs ruff lint (with auto-fix) and ruff format before each commit, so issues
are caught locally before pushing.

### Go

The `cli/` directory has its own `Makefile` with `make lint` (runs `go vet`) and
`make format` (runs `gofmt`).

### Java

The Maven converters (`converters/salesforce/`, `converters/polaris/`) are built with
`mvn verify`. Apache RAT checks license headers during the verify phase.

## Contributor License Agreement (ICLA)

All contributions to Apache Ossie are made under the [Apache License 2.0](LICENSE).
Expand Down
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

.PHONY: lint format

lint:
@echo "Running ruff check on all Python packages..."
ruff check python/ converters/ validation/

format:
@echo "Running ruff format on all Python packages..."
ruff format python/ converters/ validation/

format-check:
@echo "Checking formatting (no changes)..."
ruff format --check python/ converters/ validation/
26 changes: 26 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

line-length = 120
target-version = "py311"

[lint]
select = ["E", "F", "I", "UP", "W"]
ignore = ["E501"]

[format]
quote-style = "double"