Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ notifications:
commits: [email protected]
issues: [email protected]
pullrequests: [email protected]
jira_options: link label link label
jira_options: link label link label
2 changes: 1 addition & 1 deletion .github/.licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ header:
- 'LICENSE'
- 'NOTICE'

comment: on-failure
comment: on-failure
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ updates:
schedule:
interval: "daily"
open-pull-requests-limit: 10

33 changes: 33 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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.

name: pre-commit

on:
pull_request:
push:
branches:
- '**'
- '!dependabot/**'

jobs:
pre-commit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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.

# To use this, install the python package `pre-commit` and
# run once `pre-commit install`. This will setup a git pre-commit-hook
# that is executed on each commit and will report the linting problems.
# To run all hooks on all files use `pre-commit run -a`

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.5
hooks:
- id: clang-format

- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
hooks:
- id: cmake-format
4 changes: 2 additions & 2 deletions api/iceberg/puffin.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
namespace iceberg {

class Puffin {
public:
public:
virtual ~Puffin() = default;
virtual std::string_view print() const = 0;
static std::unique_ptr<Puffin> create();
};

} // namespace iceberg
} // namespace iceberg
4 changes: 2 additions & 2 deletions api/iceberg/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
namespace iceberg {

class Table {
public:
public:
virtual ~Table() = default;
virtual std::string_view print() const = 0;
static std::unique_ptr<Table> create();
};

} // namespace iceberg
} // namespace iceberg
2 changes: 1 addition & 1 deletion src/core/demo_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ std::string_view DemoTable::print() const { return "DemoTable"; }

std::unique_ptr<Table> Table::create() { return std::make_unique<DemoTable>(); }

} // namespace iceberg
} // namespace iceberg
4 changes: 2 additions & 2 deletions src/core/demo_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
namespace iceberg {

class DemoTable : public Table {
public:
public:
DemoTable() = default;
~DemoTable() override = default;

std::string_view print() const override;
};

} // namespace iceberg
} // namespace iceberg
6 changes: 2 additions & 4 deletions src/puffin/demo_puffin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ namespace iceberg {

std::string_view DemoPuffin::print() const { return "DemoPuffin"; }

std::unique_ptr<Puffin> Puffin::create() {
return std::make_unique<DemoPuffin>();
}
std::unique_ptr<Puffin> Puffin::create() { return std::make_unique<DemoPuffin>(); }

} // namespace iceberg
} // namespace iceberg
4 changes: 2 additions & 2 deletions src/puffin/demo_puffin.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
namespace iceberg {

class DemoPuffin : public Puffin {
public:
public:
DemoPuffin() = default;
~DemoPuffin() override = default;

std::string_view print() const override;
};

} // namespace iceberg
} // namespace iceberg