Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial tidy support #794

Merged
merged 1 commit into from Jan 30, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Add initial tidy support

Currently many directories are ignored, but we can add them as we tidy
things up
  • Loading branch information
mrobinson committed Jan 30, 2017
commit 4c389dc97727a8a9ad8b29733d2483c607b614c7
@@ -18,8 +18,9 @@ addons:
- llvm-3.8-dev
- libedit-dev
before_install:
- pip install mako
- pip install mako servo-tidy
script:
- servo-tidy
- (cd webrender_traits && cargo test --verbose --features "ipc")
- (cd webrender_traits && cargo test --verbose)
- (cd webrender && cargo test --verbose)
@@ -1,9 +1,9 @@
[workspace]
members = [
"webrender",
"webrender_traits",
"sample",
"wrench",
"webrender",
"webrender_traits",
"sample",
"wrench",
]

[profile.release]
@@ -3,6 +3,7 @@ name = "wr-sample"
version = "0.1.0"
authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
workspace = ".."
license = "MPL-2.0"

[dependencies.webrender]
path = "../webrender"
@@ -1,19 +1,23 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

extern crate app_units;
extern crate webrender;
extern crate glutin;
extern crate euclid;
extern crate gleam;
extern crate glutin;
extern crate webrender;
extern crate webrender_traits;
extern crate euclid;

use app_units::Au;
use gleam::gl;
use std::env;
use std::fs::File;
use std::io::Read;
use std::path::PathBuf;
use webrender_traits::{ColorF, Epoch, GlyphInstance};
use webrender_traits::{ImageDescriptor, ImageData, ImageFormat, PipelineId};
use webrender_traits::{LayoutSize, LayoutPoint, LayoutRect, LayoutTransform, DeviceUintSize};
use std::fs::File;
use std::io::Read;
use std::env;

fn load_file(name: &str) -> Vec<u8> {
let mut file = File::open(name).unwrap();
@@ -120,7 +124,7 @@ fn main() {
format: ImageFormat::A8,
is_opaque: true,
},
ImageData::new(vec![0,80, 180, 255])
ImageData::new(vec![0, 80, 180, 255])
),
rect: LayoutRect::new(LayoutPoint::new(75.0, 75.0), LayoutSize::new(100.0, 100.0)),
repeat: false,
@@ -0,0 +1,23 @@
[configs]
skip-check-length = false
skip-check-licenses = false

[ignore]

# Files that are ignored for all tidy and lint checks.
files = [
# servo-tidy does not properly support workspaces yet.
"./Cargo.toml",
# There are many duplicated packages, which we probably need to review
# one by one.
"./Cargo.lock"
]

# Many directories are currently ignored while we tidy things up
# gradually.
directories = [
# Generated and upstream code combined with our own. Could use cleanup
"./target",

This comment has been minimized.

@kvark

kvark Jan 27, 2017

Member

why do we need to tidy up the generated code?

This comment has been minimized.

@mrobinson

mrobinson Jan 29, 2017

Author Member

The comment is indeed a little unclear, but this is a list of directories excluded from the tidy. We will gradually remove entries.

"./webrender",
"./wrench",
]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.