Skip to content

Commit

Permalink
Added: c++ boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
noob77777 committed Apr 15, 2021
1 parent 5337741 commit 9343ec2
Show file tree
Hide file tree
Showing 34 changed files with 8,790 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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.
#
#
BasedOnStyle: Google
DerivePointerAlignment: false
PointerAlignment: Right
ColumnLimit: 120
55 changes: 55 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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.
#
---
Checks: '
bugprone-*,
clang-analyzer-*,
google-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
-readability-magic-numbers,
'
CheckOptions:
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
- { key: readability-identifier-naming.FunctionCase, value: CamelCase }
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.MemberCase, value: lower_case }
- { key: readability-identifier-naming.MemberSuffix, value: _ }
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.UnionCase, value: CamelCase }
- { key: readability-identifier-naming.VariableCase, value: lower_case }

# Turn all the warnings from the checks above into errors.
WarningsAsErrors: '*'
HeaderFilterRegex: '(benchmark|src|test|util)/include'
AnalyzeTemporaryDtors: true

#### Disabled checks and why: #####
#
# -modernize-avoid-c-arrays,
# Not feasible in the storage layer
# -modernize-use-trailing-return-type
# gtest issues
# -readability-magic-numbers,
# Blows up in tests.
52 changes: 52 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Don't send any build context to Docker.

# additional
.gitignore
Dockerfile
LICENSE
README.md

# build dir
build
cmake-build-debug/

# configs
.idea
.vscode

# pycache
__pycache__
*.pyc

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/jucc-issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: JuCC Issue Template
about: Please follow this template when creating an issue for JuCC!
title: ''
labels: ''
assignees: ''

---

Welcome to the issue tracker for **JuCC**! We're excited that you're interested in improving our system. Below, please **choose either a Feature Request or Bug Report** and replace the sample text below to describe the issue! Additionally, please choose the appropriate labels on the Github panel. If you wish to and are able to solve the issue, feel free to assign yourself; otherwise we will manage this later!

# Feature Request
## Summary
Please provide a short summary of the feature you would like implemented.

## Solution
If possible, include a description of the desired solution you have in mind. Ideally, a series of steps outlining what is required and a plan to implement would be the most helpful for our developers!

Feel free to suggest more or raise concerns with the existing items. When we're convinced of the list, we should make an overall project with issues for each item in the list to spread out the tasks and track progress.

### Alternatives
If you are aware of any alternatives to the solution you presented, please describe them here!

___

# Bug Report
**Note**: Before filing a bug report, please make sure to check whether the bug has already been filed. If it has, please do not re-file the report, our developers are already hard at work fixing it!

## Summary
Please provide a short summary of the bug observed.

## Environment
To address the bug, especially if it environment specific, we need to know what kind of configuration you are running on. Please include the following:

**OS**: Ubuntu (LTS) 20.04 or macOS 10.14+ (please specify version).

**Compiler**: GCC 7.0+ or Clang 8.0+.

**CMake Profile**: `Debug`, `Release`, `FastDebug`, or `Relwithdebinfo`. If exists across all cmake profiles on a platform-compiler combo, then please say so.

**CI**: If the bug has been observed in CI, please link to the CI build so that the bug can be referenced. Please make sure that if the issue has appeared on a PR branch that the PR itself is not causing the issue.

## Steps to Reproduce
Whenever possible, retrace how you came about the problem and describe so here.

If you have an understanding of why the bug occurred, that would be awesome to include as well! In this case, be as descriptive as you can and provide references to lines of code in the code whenever possible!

### Expected Behavior
Fill in the behavior expected from our system, as well as the reference you used.

### Actual Behavior
Fill in the behavior you actually observed for our system.
35 changes: 35 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Welcome to the PR tracker for **JuCC**! We're excited that you're interested in improving our system.

**PRs that do not follow our guidelines** will be immediately closed. In general, you should avoid creating a PR until you are reasonably confident the tests should pass, having tested locally first.

Please choose the appropriate labels on the Github panel and feel free to assign yourself. Additionally, if your PR solves an open issue, please link the issue on the Github panel. Feel free to assign reviewers to your PR or we will decide who best to assign for a review.

# Heading
Please choose an appropriate heading for your PR, relevant to the changes you have made.

## Description
Please create a description of the issue your PR solves, and how you went about implementing your solution.

### Remaining Tasks
Again, you should only create PR once you are reasonably confident you are near completion. However, if there are some tasks still remaining before the PR is ready to merge, please create a checklist to track active progress.
:pushpin: TODOs:
- [x] ~~Stash limit in Parser for pushdown (INVALID)~~
- [x] Add optional property support
- [ ] Fix memory leaks

## Further Work
If your PR unlocked the potential for further improvement, please note them here and create additional issues! Do the same if you discovered bugs in the process of development.

---
Here's an empty template to format yourself!
# Heading

## Description

## Remaining tasks

- [ ] Foo
- [ ] Bar
- [ ] Baz

## Further work
45 changes: 45 additions & 0 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
linux-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: setup environment
run: |
export DEBIAN_FRONTEND="noninteractive"
mkdir build
sudo apt-get -y update
- name: installing dependecies
run: |
echo y | sudo ./script/installation/packages.sh all
- name: build
working-directory: ./build
run: |
cmake -GNinja ..
ninja -j2
- name: check linting & formatting
working-directory: ./build
run: |
ninja check-format
ninja check-lint
ninja check-clang-tidy
- name: run unit-tests
working-directory: ./build
run: |
ninja test
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# build dir
build
cmake-build-debug/

# configs
.idea
.vscode

# pycache
__pycache__
*.pyc

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

Loading

0 comments on commit 9343ec2

Please sign in to comment.